[vlc-commits] qml: introduce GridItem selected border width constant in VLCStyle

Prince Gupta git at videolan.org
Wed Jan 27 09:25:29 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Thu Jan  7 19:33:42 2021 +0530| [70706a26b2e67630531cf5c17793f107e681d474] | committer: Pierre Lamot

qml: introduce GridItem selected border width constant in VLCStyle

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=70706a26b2e67630531cf5c17793f107e681d474
---

 modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml | 2 +-
 modules/gui/qt/style/VLCStyle.qml                        | 2 ++
 modules/gui/qt/widgets/qml/GridItem.qml                  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml b/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
index 11d7eb6a69..5063963975 100644
--- a/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
+++ b/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
@@ -73,7 +73,7 @@ Widgets.NavigableFocusScope {
 
         currentIndex: root._currentIndex
 
-        implicitHeight: VLCStyle.gridItem_network_height + VLCStyle.margin_xlarge
+        implicitHeight: VLCStyle.gridItem_network_height + VLCStyle.gridItemSelectedBorder + VLCStyle.margin_large
         orientation: ListView.Horizontal
         anchors.fill: parent
         spacing: VLCStyle.column_margin_width
diff --git a/modules/gui/qt/style/VLCStyle.qml b/modules/gui/qt/style/VLCStyle.qml
index 919de6ccef..24048aa0dd 100644
--- a/modules/gui/qt/style/VLCStyle.qml
+++ b/modules/gui/qt/style/VLCStyle.qml
@@ -189,6 +189,8 @@ Item {
     property int gridItem_video_height_large: VLCStyle.gridCover_video_height_large + VLCStyle.margin_xxsmall + VLCStyle.fontHeight_large +
                                               VLCStyle.margin_xxsmall + VLCStyle.fontHeight_normal
 
+    property int gridItemSelectedBorder: dp(8, scale)
+
     property int column_width: dp(114, scale)
     property int column_margin_width: dp(32, scale)
 
diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index 1cff8f0dcb..302c0ed8bb 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -63,7 +63,7 @@ FocusScope {
 
     readonly property bool _highlighted: mouseArea.containsMouse || content.activeFocus
 
-    readonly property int selectedBorderWidth: VLCStyle.column_margin_width - ( VLCStyle.margin_small * 2 )
+    readonly property int selectedBorderWidth: VLCStyle.gridItemSelectedBorder
 
     property int _newIndicatorMedian: VLCStyle.margin_xsmall
     property int _modifiersOnLastPress: Qt.NoModifier



More information about the vlc-commits mailing list