[vlc-commits] [Git][videolan/vlc][master] qml: provide borders for each dnd view in toolbar editor

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Mar 9 13:38:55 UTC 2024



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
27ccc2a2 by Fatih Uzunoglu at 2024-03-09T13:19:59+00:00
qml: provide borders for each dnd view in toolbar editor

- - - - -


1 changed file:

- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml


Changes:

=====================================
modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
=====================================
@@ -84,17 +84,10 @@ Item {
             }
         }
 
-        Rectangle{
-            id: parentRectangle
-
+        Item {
             Layout.preferredHeight: VLCStyle.controlLayoutHeight * 1.5
             Layout.fillWidth: true
 
-            color: theme.bg.primary
-
-            border.color: theme.border
-            border.width: VLCStyle.border
-
             TextMetrics {
                 id: leftMetric
                 text: I18n.qtr("L   E   F   T")
@@ -190,15 +183,19 @@ Item {
                                 return true
                             }
 
-                            Layout.minimumWidth: !!item && item.visible ? Math.max(leftMetric.width,
-                                                                                   centerMetric.width,
-                                                                                   rightMetric.width) * 1.25
-                                                                        : 0
-                            Layout.margins: parentRectangle.border.width
+                            Layout.minimumWidth: (!!item && item.visible && item.count <= 0) ? Math.max(leftMetric.width,
+                                                                                                      centerMetric.width,
+                                                                                                      rightMetric.width) * 1.25
+                                                                                             : 0
 
                             readonly property int count: !!item ? item.count : 0
 
-                            sourceComponent: Item {
+                            sourceComponent: Rectangle {
+                                color: theme.bg.primary
+
+                                border.color: theme.border
+                                border.width: VLCStyle.border
+
                                 property alias count: dndView.count
 
                                 Connections {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/27ccc2a2133c5571f1280ff851b0d22a066c5c1d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/27ccc2a2133c5571f1280ff851b0d22a066c5c1d
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list