[vlc-commits] qml: make SortControls VLCColors overridable
Fatih Uzunoglu
git at videolan.org
Fri Jul 24 11:45:59 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Mon Jul 6 21:59:08 2020 +0300| [7989d05c54ce35866bd2d8a51225584a0236bf83] | committer: Pierre Lamot
qml: make SortControls VLCColors overridable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7989d05c54ce35866bd2d8a51225584a0236bf83
---
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
}
}
}
More information about the vlc-commits
mailing list