Skip to content
Snippets Groups Projects
Commit d28d8274 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qml: fix binding not restored with Qt 6 in PlayButton

parent 9dc558a2
No related branches found
No related tags found
1 merge request!5211qml: fix binding not restored with Qt 6 in PlayButton
Pipeline #459139 passed with warnings with stage
in 49 minutes and 17 seconds
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment