[vlc-devel] [PATCH 19/28] qml: make SortControls VLCColors overridable
Fatih Uzunoglu
fuzun54 at outlook.com
Tue Jul 21 19:28:49 CEST 2020
---
modules/gui/qt/widgets/qml/SortControl.qml | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/SortControl.qml b/modules/gui/qt/widgets/qml/SortControl.qml
index f48ae13d02..9997de0fba 100644
--- a/modules/gui/qt/widgets/qml/SortControl.qml
+++ b/modules/gui/qt/widgets/qml/SortControl.qml
@@ -36,6 +36,8 @@ Widgets.NavigableFocusScope {
property alias currentIndex: list.currentIndex
property alias focusPolicy: button.focusPolicy
+ property VLCColors _colors: VLCStyle.colors
+
signal sortSelected(var modelData)
onFocusChanged: {
@@ -57,6 +59,9 @@ Widgets.NavigableFocusScope {
focus: true
+ color: _colors.buttonText
+ colorDisabled: _colors.textInactive
+
onClicked: {
if (popup.opened)
popup.close()
@@ -95,7 +100,7 @@ Widgets.NavigableFocusScope {
spacing: 0
highlight: Rectangle {
- color: VLCStyle.colors.accent
+ color: _colors.accent
}
Rectangle {
@@ -103,7 +108,7 @@ Widgets.NavigableFocusScope {
width: parent.width
height: parent.height
color: "transparent"
- border.color: VLCStyle.colors.accent
+ border.color: _colors.accent
}
ScrollIndicator.vertical: ScrollIndicator { }
@@ -121,7 +126,7 @@ Widgets.NavigableFocusScope {
Rectangle {
anchors.fill: parent
- color: VLCStyle.colors.accent
+ color: _colors.accent
visible: mouseArea.containsMouse
}
@@ -133,7 +138,7 @@ Widgets.NavigableFocusScope {
bottomPadding: VLCStyle.margin_xxsmall
leftPadding: VLCStyle.margin_xsmall
rightPadding: VLCStyle.margin_xsmall
- color: VLCStyle.colors.buttonText
+ color: _colors.buttonText
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
}
@@ -155,8 +160,8 @@ Widgets.NavigableFocusScope {
}
background: Rectangle {
- color: VLCStyle.colors.button
- border.color: VLCStyle.colors.buttonBorder
+ color: _colors.button
+ border.color: _colors.buttonBorder
}
}
}
--
2.25.1
More information about the vlc-devel
mailing list