[vlc-commits] qml: add miniplayer condition property to sliderbar

Fatih Uzunoglu git at videolan.org
Thu Aug 27 12:44:38 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Tue Jul 28 18:19:22 2020 +0300| [db0f798258ca05258736f58c689e3b9e98276b54] | committer: Pierre Lamot

qml: add miniplayer condition property to sliderbar

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db0f798258ca05258736f58c689e3b9e98276b54
---

 modules/gui/qt/player/qml/SliderBar.qml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/player/qml/SliderBar.qml b/modules/gui/qt/player/qml/SliderBar.qml
index feae7e7c90..75e5a1563a 100644
--- a/modules/gui/qt/player/qml/SliderBar.qml
+++ b/modules/gui/qt/player/qml/SliderBar.qml
@@ -24,11 +24,13 @@ import "qrc:///style/"
 
 Slider {
     id: control
-    property int barHeight: 5
+
+    property int barHeight: isMiniplayer ? VLCStyle.dp(3) : VLCStyle.dp(5)
     property bool _isHold: false
     property bool _isSeekPointsShown: true
-    
-    anchors.margins: VLCStyle.margin_xxsmall
+    property bool isMiniplayer: false
+
+    anchors.margins: isMiniplayer ? 0 : VLCStyle.margin_xxsmall
 
     Keys.onRightPressed: player.jumpFwd()
     Keys.onLeftPressed: player.jumpBwd()
@@ -203,7 +205,7 @@ Slider {
             id: progressRect
             width: control.visualPosition * parent.width
             height: control.barHeight
-            color: control.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.bgHover
+            color: (control.activeFocus || control.isMiniplayer) ? VLCStyle.colors.accent : VLCStyle.colors.bgHover
             radius: control.barHeight
         }
 



More information about the vlc-commits mailing list