From e2a13e9ac79a8d8d8a7dfd0916f6826760b73165 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 24 Mar 2020 08:36:30 -0600 Subject: [PATCH] Revert "Make animation durations consistent with Kirigami values" This reverts commit 049978008b1268a1f46bde99ad260002fee7fd56. This commit changes existing animation durations, and must be landed simultaneously with Plasma 5.19's release so that rolling release users don't suffer from very slow animations for a month. Will re-land after Plasma 5.59 is tagged so it gets released with Frameworks 5.60, the dependency version for Plasma 5.19. --- src/declarativeimports/core/plugins.qmltypes | 1 - src/declarativeimports/core/units.cpp | 9 ++------- src/declarativeimports/core/units.h | 12 ------------ .../kirigamiplasmadesktopstyle/Units.qml | 6 ------ src/declarativeimports/kirigamiplasmastyle/Units.qml | 6 ------ 5 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/declarativeimports/core/plugins.qmltypes b/src/declarativeimports/core/plugins.qmltypes index b78040db5..b66b7d769 100644 --- a/src/declarativeimports/core/plugins.qmltypes +++ b/src/declarativeimports/core/plugins.qmltypes @@ -882,7 +882,6 @@ Module { Property { name: "devicePixelRatio"; type: "double"; isReadonly: true } Property { name: "longDuration"; type: "int"; isReadonly: true } Property { name: "shortDuration"; type: "int"; isReadonly: true } - Property { name: "veryLongDuration"; type: "int"; isReadonly: true } Signal { name: "spacingChanged" } Signal { name: "durationChanged" } Method { diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp index edb853476..146ce8525 100644 --- a/src/declarativeimports/core/units.cpp +++ b/src/declarativeimports/core/units.cpp @@ -33,7 +33,7 @@ #include #include -const int defaultLongDuration = 250; +const int defaultLongDuration = 120; SharedAppFilter::SharedAppFilter(QObject *parent) @@ -272,12 +272,7 @@ int Units::longDuration() const int Units::shortDuration() const { - return qMax(1, qRound(m_longDuration * 0.6)); -} - -int Units::veryLongDuration() const -{ - return m_longDuration * 2; + return qMax(1, m_longDuration / 5); } #include "moc_units.cpp" diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h index 129a3bfcf..f3d444c7f 100644 --- a/src/declarativeimports/core/units.h +++ b/src/declarativeimports/core/units.h @@ -132,12 +132,6 @@ class Units : public QObject */ Q_PROPERTY(int shortDuration READ shortDuration NOTIFY durationChanged) - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - Q_PROPERTY(int veryLongDuration READ veryLongDuration NOTIFY durationChanged) - public: /// @cond INTERNAL_DOCS @@ -193,12 +187,6 @@ public: * @since 5.0 */ int shortDuration() const; - - /** - * @return Duration for very long animations, in milliseconds. - * @since 5.69 - */ - int veryLongDuration() const; /// @endcond /** diff --git a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml index 9ddb24a8e..40903b7aa 100644 --- a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml @@ -99,12 +99,6 @@ QtObject { */ property int shortDuration: units.shortDuration - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - property int veryLongDuration: units.veryLongDuration - readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" } /** diff --git a/src/declarativeimports/kirigamiplasmastyle/Units.qml b/src/declarativeimports/kirigamiplasmastyle/Units.qml index 19bd59d60..ef4b6b8d1 100644 --- a/src/declarativeimports/kirigamiplasmastyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmastyle/Units.qml @@ -93,12 +93,6 @@ QtObject { */ property int shortDuration: units.shortDuration - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - property int veryLongDuration: units.veryLongDuration - /** * How much the mouse scroll wheel scrolls, expressed in lines of text. * Note: this is strictly for classical mouse wheels, touchpads 2 figer scrolling won't be affected