[vlc-commits] qml: don't animate samples property of shadows in GridItem

Prince Gupta git at videolan.org
Mon Oct 5 18:10:36 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Oct  2 17:59:13 2020 +0530| [15823e53b76023c49161e2d819bab8765bd57014] | committer: Pierre Lamot

qml: don't animate samples property of shadows in GridItem

previously these were binded to property radius which is animated

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15823e53b76023c49161e2d819bab8765bd57014
---

 modules/gui/qt/widgets/qml/GridItem.qml | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index 779eb3909f..5f6daf79d2 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -66,8 +66,10 @@ FocusScope {
 
     property alias _primaryShadowVerticalOffset: primaryShadow.verticalOffset
     property alias _primaryShadowRadius: primaryShadow.radius
+    property alias _primaryShadowSamples: primaryShadow.samples
     property alias _secondaryShadowVerticalOffset: secondaryShadow.verticalOffset
     property alias _secondaryShadowRadius: secondaryShadow.radius
+    property alias _secondaryShadowSamples: secondaryShadow.samples
 
     property int _newIndicatorMedian: VLCStyle.margin_xsmall
 
@@ -79,8 +81,10 @@ FocusScope {
                 target: root
                 _primaryShadowVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
                 _primaryShadowRadius: VLCStyle.dp(14, VLCStyle.scale)
+                _primaryShadowSamples: 1 + VLCStyle.dp(14, VLCStyle.scale) * 2
                 _secondaryShadowVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
                 _secondaryShadowRadius: VLCStyle.dp(3, VLCStyle.scale)
+                _secondaryShadowSamples: 1 + VLCStyle.dp(3, VLCStyle.scale) * 2
                 _newIndicatorMedian: VLCStyle.margin_xsmall
             }
         },
@@ -90,8 +94,10 @@ FocusScope {
                 target: root
                 _primaryShadowVerticalOffset: VLCStyle.dp(32, VLCStyle.scale)
                 _primaryShadowRadius: VLCStyle.dp(72, VLCStyle.scale)
+                _primaryShadowSamples: 1 + VLCStyle.dp(72, VLCStyle.scale) * 2
                 _secondaryShadowVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
                 _secondaryShadowRadius: VLCStyle.dp(8, VLCStyle.scale)
+                _secondaryShadowSamples: 1 + VLCStyle.dp(8, VLCStyle.scale) * 2
                 _newIndicatorMedian: VLCStyle.margin_small
             }
         }
@@ -99,10 +105,16 @@ FocusScope {
 
     transitions: Transition {
         to: "*"
-        SmoothedAnimation {
-          duration: 64
-          properties: "_primaryShadowVerticalOffset,_primaryShadowRadius,_secondaryShadowVerticalOffset,_secondaryShadowRadius,_newIndicatorMedian"
-       }
+        SequentialAnimation {
+            PropertyAction {
+                properties: "_primaryShadowSamples,_secondaryShadowSamples"
+            }
+
+            SmoothedAnimation {
+                duration: 64
+                properties: "_primaryShadowVerticalOffset,_primaryShadowRadius,_secondaryShadowVerticalOffset,_secondaryShadowRadius,_newIndicatorMedian"
+            }
+        }
     }
 
     MouseArea {
@@ -166,10 +178,7 @@ FocusScope {
                 anchors.fill: baseRect
                 source: baseRect
                 horizontalOffset: 0
-                verticalOffset: VLCStyle.dp(6, VLCStyle.scale)
-                radius: VLCStyle.dp(14, VLCStyle.scale)
                 spread: 0
-                samples: ( radius * 2 ) + 1
                 color: Qt.rgba(0, 0, 0, .22)
             }
 
@@ -179,10 +188,7 @@ FocusScope {
                 anchors.fill: baseRect
                 source: baseRect
                 horizontalOffset: 0
-                verticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-                radius: VLCStyle.dp(3, VLCStyle.scale)
                 spread: 0
-                samples: ( radius * 2 ) + 1
                 color: Qt.rgba(0, 0, 0, .18)
             }
 



More information about the vlc-commits mailing list