[vlc-commits] qml: remove `isMiniPlayer` property from SliderBar
Prince Gupta
git at videolan.org
Mon Feb 8 10:00:23 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Jan 20 19:54:26 2021 +0530| [efafb00f5a2d8c55f6fae3eb3b7ff8fd11af6b11] | committer: Pierre Lamot
qml: remove `isMiniPlayer` property from SliderBar
provide direct properties to change
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=efafb00f5a2d8c55f6fae3eb3b7ff8fd11af6b11
---
modules/gui/qt/player/qml/MiniPlayer.qml | 8 ++++----
modules/gui/qt/player/qml/SliderBar.qml | 13 ++++++-------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/modules/gui/qt/player/qml/MiniPlayer.qml b/modules/gui/qt/player/qml/MiniPlayer.qml
index b30aacf219..398d22cae4 100644
--- a/modules/gui/qt/player/qml/MiniPlayer.qml
+++ b/modules/gui/qt/player/qml/MiniPlayer.qml
@@ -78,13 +78,13 @@ Widgets.NavigableFocusScope {
SliderBar {
id: progressBar
+
+ barHeight: VLCStyle.dp(3, VLCStyle.scale)
value: player.position
visible: progressBar.value >= 0.0 && progressBar.value <= 1.0
-
+ backgroundColor: colors.sliderBarMiniplayerBgColor
+ progressBarColor: colors.accent
focus: true
-
- isMiniplayer: true
-
anchors {
left: parent.left
right: parent.right
diff --git a/modules/gui/qt/player/qml/SliderBar.qml b/modules/gui/qt/player/qml/SliderBar.qml
index b3eee4d6af..cb49446997 100644
--- a/modules/gui/qt/player/qml/SliderBar.qml
+++ b/modules/gui/qt/player/qml/SliderBar.qml
@@ -26,17 +26,16 @@ import "qrc:///style/"
Slider {
id: control
- property int barHeight: isMiniplayer ? VLCStyle.dp(3, VLCStyle.scale) : VLCStyle.dp(5, VLCStyle.scale)
+ property int barHeight: VLCStyle.dp(5, VLCStyle.scale)
property bool _isHold: false
property bool _isSeekPointsShown: true
- property bool isMiniplayer: false
property alias parentWindow: timeTooltip.parentWindow
+ property alias backgroundColor: sliderRect.color
+ property alias progressBarColor: progressRect.color
property VLCColors colors: VLCStyle.colors
- anchors.margins: isMiniplayer ? 0 : VLCStyle.margin_xxsmall
-
Keys.onRightPressed: player.jumpFwd()
Keys.onLeftPressed: player.jumpBwd()
@@ -85,7 +84,7 @@ Slider {
width: control.availableWidth
implicitHeight: control.implicitHeight
height: implicitHeight
- color: isMiniplayer ? (control.colors.sliderBarMiniplayerBgColor) : control.colors.setColorAlpha( control.colors.playerFg, 0.2 )
+ color: control.colors.setColorAlpha( control.colors.playerFg, 0.2 )
radius: implicitHeight
MouseArea {
@@ -125,7 +124,7 @@ Slider {
id: progressRect
width: control.visualPosition * parent.width
height: control.barHeight
- color: (control.activeFocus || control.isMiniplayer) ? control.colors.accent : control.colors.bgHover
+ color: control.activeFocus ? control.colors.accent : control.colors.bgHover
radius: control.barHeight
}
@@ -261,6 +260,6 @@ Slider {
}
]
- state: isMiniplayer ? ((control.hovered || control.activeFocus) ? "visible" : "hidden") : undefined
+ state: (control.hovered || control.activeFocus) ? "visible" : "hidden"
}
}
More information about the vlc-commits
mailing list