[vlc-devel] [PATCH] qml: don't animate samples property of shadows in GridItem
Pierre Lamot
pierre at videolabs.io
Fri Oct 2 14:26:17 CEST 2020
Hi,
patch LGTM
On 2020-10-02 14:11, Prince Gupta wrote:
> previously these were binded to property radius which is animated
> ---
> 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-devel
mailing list