Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d28d8274 by Fatih Uzunoglu at 2024-04-13T15:38:41+00:00
qml: fix binding not restored with Qt 6 in PlayButton

- - - - -


1 changed file:

- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml


Changes:

=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -284,15 +284,12 @@ T.Control {
                 color: "white"
 
                 anchors.fill: parent
-                anchors.margins: VLCStyle.dp(2)
+                anchors.margins: _diminished ? (parent.width / 2)
+                                             : VLCStyle.dp(2)
 
                 radius: width
 
-                Binding on anchors.margins {
-                    id: marginBinding
-                    when: false
-                    value: (innerRectangle.parent.width / 2)
-                }
+                property bool _diminished: false
 
                 onStateChanged: {
                     if (state === "diminished") {
@@ -301,7 +298,7 @@ T.Control {
                     } else {
                         bindingTimer.stop()
                         marginBehavior.enabled = false
-                        marginBinding.when = false
+                        _diminished = false
                     }
                 }
 
@@ -311,7 +308,7 @@ T.Control {
                     // to hold the button.
                     id: bindingTimer
                     interval: mouseArea.pressAndHoldInterval / 3
-                    onTriggered: marginBinding.when = true
+                    onTriggered: innerRectangle._diminished = true
                 }
 
                 Behavior on anchors.margins {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d28d827465b5dda15f4e0105d9512086cd727426

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d28d827465b5dda15f4e0105d9512086cd727426
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to