[vlc-commits] qml: don't use 'state.when' for transitioning between states in GridItem
Prince Gupta
git at videolan.org
Mon Sep 28 14:01:32 CEST 2020
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Sep 9 18:52:34 2020 +0530| [0f99f213e0a15de99efef7f58ec833bd73878c79] | committer: Pierre Lamot
qml: don't use 'state.when' for transitioning between states in GridItem
using 'when' produces an intermediatory null state when transiontioning causing not soo smooth animation
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f99f213e0a15de99efef7f58ec833bd73878c79
---
modules/gui/qt/widgets/qml/GridItem.qml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index ebd34d0f85..779eb3909f 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -71,10 +71,10 @@ FocusScope {
property int _newIndicatorMedian: VLCStyle.margin_xsmall
+ state: _highlighted ? "selected" : "unselected"
states: [
State {
name: "unselected"
- when: !root._highlighted
PropertyChanges {
target: root
_primaryShadowVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
@@ -86,7 +86,6 @@ FocusScope {
},
State {
name: "selected"
- when: root._highlighted
PropertyChanges {
target: root
_primaryShadowVerticalOffset: VLCStyle.dp(32, VLCStyle.scale)
More information about the vlc-commits
mailing list