[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml/WindowDialog: Improve selection buttons clarity

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Jun 12 08:20:42 UTC 2022



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


Commits:
39c0223b by Benjamin Arnaud at 2022-06-12T08:01:11+00:00
qml/WindowDialog: Improve selection buttons clarity

fix #26675

- - - - -
6f5ea060 by Benjamin Arnaud at 2022-06-12T08:01:11+00:00
qml/ToolbarEditor: Adjust content margins

- - - - -


2 changed files:

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


Changes:

=====================================
modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
=====================================
@@ -76,9 +76,7 @@ Window {
         DialogButtonBox {
             id: buttonBox
 
-            bottomPadding: 0
-            topPadding: 0
-            padding: VLCStyle.margin_small
+            padding: 0
             spacing: VLCStyle.margin_small
 
             Layout.fillWidth: true
@@ -86,17 +84,28 @@ Window {
 
             standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
 
+            background: null
+
             onAccepted: root.accepted()
             onRejected: root.rejected(true)
             onApplied: root.applied()
             onDiscarded: root.discarded()
             onReset: root.reset()
 
-            Component.onCompleted: {
-                background.color = Qt.binding(function() { return VLCStyle.colors.bgAlt })
-            }
+            delegate: Widgets.TextToolButton {
+                id: button
+
+                // NOTE: We specify a dedicated background with borders to improve clarity.
+                background: Widgets.AnimatedBackground {
+                    backgroundColor: (button.hovered) ? VLCStyle.colors.buttonHover
+                                                      : VLCStyle.colors.bgAlt
 
-            delegate: Widgets.TextToolButton { }
+                    border.width: VLCStyle.border
+
+                    border.color: (button.visualFocus) ? activeBorderColor
+                                                       : VLCStyle.colors.buttonBorder
+                }
+            }
         }
     }
 }


=====================================
modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
=====================================
@@ -237,7 +237,7 @@ Rectangle{
         Rectangle {
             Layout.fillHeight: true
             Layout.fillWidth: true
-            Layout.margins: VLCStyle.margin_xxsmall
+            Layout.topMargin: VLCStyle.margin_xxsmall
 
             color: VLCStyle.colors.bgAlt
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b2b040a2fd66d57c4bd18b8b877cc41782c0f789...6f5ea06071738e90740c5507aa72857a95e0ebe8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b2b040a2fd66d57c4bd18b8b877cc41782c0f789...6f5ea06071738e90740c5507aa72857a95e0ebe8
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