summary refs log tree commit diff
path: root/resources/qml/ui/media/MediaControls.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/ui/media/MediaControls.qml')
-rw-r--r--resources/qml/ui/media/MediaControls.qml28
1 files changed, 8 insertions, 20 deletions
diff --git a/resources/qml/ui/media/MediaControls.qml b/resources/qml/ui/media/MediaControls.qml
index 0519a194..f4373908 100644
--- a/resources/qml/ui/media/MediaControls.qml
+++ b/resources/qml/ui/media/MediaControls.qml
@@ -71,7 +71,7 @@ Rectangle {
         spacing: 0
         anchors.bottom: control.bottom
         anchors.left: control.left
-        anchors.right: control.right
+        width: Math.max(implicitWidth, control.width)
 
         NhekoSlider {
             Layout.fillWidth: true
@@ -134,8 +134,9 @@ Rectangle {
 
                 state: ""
                 Layout.alignment: Qt.AlignLeft
-                Layout.preferredWidth: 0
+                Layout.preferredWidth: 100
                 opacity: 0
+                enabled: false
                 orientation: Qt.Horizontal
                 value: 1
                 onDesiredVolumeChanged: {
@@ -158,12 +159,6 @@ Rectangle {
                             }
 
                         }
-
-                        NumberAnimation {
-                            properties: "Layout.preferredWidth"
-                            duration: 150
-                        }
-
                     },
                     Transition {
                         from: "shown"
@@ -181,10 +176,6 @@ Rectangle {
                                     easing.type: Easing.InQuad
                                 }
 
-                                NumberAnimation {
-                                    properties: "Layout.preferredWidth"
-                                    duration: 150
-                                }
 
                             }
 
@@ -198,27 +189,24 @@ Rectangle {
                     when: Settings.mobileMode || volumeButton.hovered || volumeSlider.hovered || volumeSlider.pressed
 
                     PropertyChanges {
-                        volumeSlider.implicitWidth: 100
-                    }
-
-                    PropertyChanges {
                         volumeSlider.opacity: 1
+                        volumeSlider.enabled: true
                     }
 
                 }
 
             }
 
+            Item {
+                Layout.fillWidth: true
+            }
+
             Label {
                 Layout.alignment: Qt.AlignRight
                 text: (!control.mediaLoaded ? "-- " : durationToString(control.positionValue)) + " / " + durationToString(control.duration)
                 color: palette.text
             }
 
-            Item {
-                Layout.fillWidth: true
-            }
-
         }
 
     }