[vlc-devel] [PATCH 09/38] qml: add miniplayer condition property to sliderbar

Fatih Uzunoglu fuzun54 at outlook.com
Thu Aug 20 19:55:18 CEST 2020


---
 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
         }
 
-- 
2.25.1



More information about the vlc-devel mailing list