[vlc-devel] [PATCH 1/2] qml: introduce GridItem selected border width constant in VLCStyle
Prince Gupta
guptaprince8832 at gmail.com
Fri Jan 22 16:16:08 UTC 2021
---
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 6c401cfcba..8db70dfd71 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
--
2.25.1
More information about the vlc-devel
mailing list