[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml/KeyNavigableTableView: Update the 'contextButton' position

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Dec 18 13:55:25 UTC 2022



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


Commits:
a4228da0 by Benjamin Arnaud at 2022-12-18T13:14:46+00:00
qml/KeyNavigableTableView: Update the 'contextButton' position

- - - - -
00d070ed by Benjamin Arnaud at 2022-12-18T13:14:46+00:00
qml/TableView: Do not expose 'horizontalSpacing'

Having a custom horizontalSpacing would conflict with the helpers VLCStyle.colWidth
and VLCStyle.gridColumnsForWidth and the grid placement overall.

- - - - -


2 changed files:

- modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
- modules/gui/qt/widgets/qml/TableViewDelegate.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
=====================================
@@ -66,7 +66,6 @@ FocusScope {
 
     property Util.SelectableDelegateModel selectionDelegateModel
     property real rowHeight: VLCStyle.tableRow_height
-    property int horizontalSpacing: VLCStyle.column_spacing
 
     property real availableRowWidth: 0
     property real _availabeRowWidthLastUpdateTime: Date.now()
@@ -309,7 +308,7 @@ FocusScope {
                     topPadding: root.headerTopPadding
                     bottomPadding: VLCStyle.margin_xsmall
 
-                    spacing: root.horizontalSpacing
+                    spacing: VLCStyle.column_spacing
 
                     Repeater {
                         model: sortModel
@@ -372,8 +371,6 @@ FocusScope {
             width: view.width
             height: root.rowHeight
 
-            horizontalSpacing: root.horizontalSpacing
-
             leftPadding: root.contentLeftMargin
             rightPadding: root.contentRightMargin
 


=====================================
modules/gui/qt/widgets/qml/TableViewDelegate.qml
=====================================
@@ -39,8 +39,6 @@ T.Control {
 
     readonly property bool dragActive: hoverArea.drag.active
 
-    property int horizontalSpacing: 0
-
     property var dragItem
 
     property bool acceptDrop: false
@@ -165,7 +163,7 @@ T.Control {
     contentItem: Row {
         id: content
 
-        spacing: delegate.horizontalSpacing
+        spacing: VLCStyle.column_spacing
 
         Repeater {
             model: delegate.sortModel
@@ -200,6 +198,12 @@ T.Control {
             Widgets.IconToolButton {
                 id: contextButton
 
+                anchors.left: parent.left
+
+                // NOTE: We want the contextButton to be contained inside the trailing
+                //       column_spacing.
+                anchors.leftMargin: -width
+
                 anchors.verticalCenter: parent.verticalCenter
 
                 iconText: VLCIcons.ellipsis



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b9a5e8687e85f7629f0dccfdfda6c6648e886940...00d070eda148b49678cea9598bc0b6b166965a77

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b9a5e8687e85f7629f0dccfdfda6c6648e886940...00d070eda148b49678cea9598bc0b6b166965a77
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