[vlc-commits] qml: allow forcing theme for SliderBar
Fatih Uzunoglu
git at videolan.org
Tue Jan 12 13:21:00 UTC 2021
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Jan 8 00:37:02 2021 +0300| [88df68a8b875a688b10fedbf734d890173b13cc7] | committer: Pierre Lamot
qml: allow forcing theme for SliderBar
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88df68a8b875a688b10fedbf734d890173b13cc7
---
modules/gui/qt/player/qml/ControlBar.qml | 2 ++
modules/gui/qt/player/qml/SliderBar.qml | 14 +++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index 6b4b9c4565..917f6e0c1e 100644
--- a/modules/gui/qt/player/qml/ControlBar.qml
+++ b/modules/gui/qt/player/qml/ControlBar.qml
@@ -87,6 +87,8 @@ Widgets.NavigableFocusScope {
Keys.onDownPressed: playerButtonsLayout.focus = true
parentWindow: g_root
+
+ colors: VLCStyle.nightColors
}
Item {
diff --git a/modules/gui/qt/player/qml/SliderBar.qml b/modules/gui/qt/player/qml/SliderBar.qml
index 24a723ac58..4fe49c26de 100644
--- a/modules/gui/qt/player/qml/SliderBar.qml
+++ b/modules/gui/qt/player/qml/SliderBar.qml
@@ -33,6 +33,8 @@ Slider {
property alias parentWindow: timeTooltip.parentWindow
+ property VLCColors colors: VLCStyle.colors
+
anchors.margins: isMiniplayer ? 0 : VLCStyle.margin_xxsmall
Keys.onRightPressed: player.jumpFwd()
@@ -55,6 +57,8 @@ Slider {
" - " + player.chapters.getNameAtPosition(timeTooltip.position) : "")
mouseArea: sliderRectMouseArea
+
+ colors: control.colors
}
Connections {
@@ -81,7 +85,7 @@ Slider {
width: control.availableWidth
implicitHeight: control.implicitHeight
height: implicitHeight
- color: isMiniplayer ? (VLCStyle.colors.sliderBarMiniplayerBgColor) : VLCStyle.colors.setColorAlpha( VLCStyle.colors.playerFg, 0.2 )
+ color: isMiniplayer ? (control.colors.sliderBarMiniplayerBgColor) : control.colors.setColorAlpha( control.colors.playerFg, 0.2 )
radius: implicitHeight
MouseArea {
@@ -121,7 +125,7 @@ Slider {
id: progressRect
width: control.visualPosition * parent.width
height: control.barHeight
- color: (control.activeFocus || control.isMiniplayer) ? VLCStyle.colors.accent : VLCStyle.colors.bgHover
+ color: (control.activeFocus || control.isMiniplayer) ? control.colors.accent : control.colors.bgHover
radius: control.barHeight
}
@@ -134,7 +138,7 @@ Slider {
height: control.barHeight
opacity: 0.4
- color: VLCStyle.colors.buffer
+ color: control.colors.buffer
radius: control.barHeight
states: [
@@ -209,7 +213,7 @@ Slider {
id: seekpointsRect
property real position: model.position === undefined ? 0.0 : model.position
- color: VLCStyle.colors.seekpoint
+ color: control.colors.seekpoint
width: VLCStyle.dp(1, VLCStyle.scale)
height: control.barHeight
x: sliderRect.width * seekpointsRect.position
@@ -238,7 +242,7 @@ Slider {
implicitWidth: VLCStyle.margin_small
implicitHeight: VLCStyle.margin_small
radius: VLCStyle.margin_small
- color: VLCStyle.colors.accent
+ color: control.colors.accent
transitions: [
Transition {
More information about the vlc-commits
mailing list