Add veryShortDuration
This adds an veryShortDuration for UI elements that should animate near instantly, but should have a hint of smoothness.
This commit is contained in:
parent
ddac70f40c
commit
aecf9237cc
@ -261,6 +261,11 @@ int Units::shortDuration() const
|
|||||||
return qMax(1, qRound(m_longDuration * 0.6));
|
return qMax(1, qRound(m_longDuration * 0.6));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Units::veryShortDuration() const
|
||||||
|
{
|
||||||
|
return qRound(m_longDuration * 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
int Units::veryLongDuration() const
|
int Units::veryLongDuration() const
|
||||||
{
|
{
|
||||||
return m_longDuration * 2;
|
return m_longDuration * 2;
|
||||||
|
@ -119,6 +119,12 @@ class Units : public QObject
|
|||||||
*/
|
*/
|
||||||
Q_PROPERTY(int shortDuration READ shortDuration NOTIFY durationChanged)
|
Q_PROPERTY(int shortDuration READ shortDuration NOTIFY durationChanged)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* units.veryShortDuration should be used for elements that should animate near instantly,
|
||||||
|
* but should have a hint of smoothness
|
||||||
|
*/
|
||||||
|
Q_PROPERTY(int veryShortDuration READ veryShortDuration NOTIFY durationChanged)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* units.veryLongDuration should be used for specialty animations that benefit
|
* units.veryLongDuration should be used for specialty animations that benefit
|
||||||
* from being even longer than longDuration.
|
* from being even longer than longDuration.
|
||||||
@ -186,6 +192,12 @@ public:
|
|||||||
* @since 5.69
|
* @since 5.69
|
||||||
*/
|
*/
|
||||||
int veryLongDuration() const;
|
int veryLongDuration() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Duration for instantaneous animations, in milliseconds.
|
||||||
|
* @since 5.78
|
||||||
|
*/
|
||||||
|
int veryShortDuration() const;
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,6 +96,12 @@ QtObject {
|
|||||||
*/
|
*/
|
||||||
property int veryLongDuration: units.veryLongDuration
|
property int veryLongDuration: units.veryLongDuration
|
||||||
|
|
||||||
|
/**
|
||||||
|
* units.veryShortDuration should be used for elements that should have a hint of smoothness,
|
||||||
|
* but otherwise animate near instantly.
|
||||||
|
*/
|
||||||
|
property int veryShortDuration: units.veryShortDuration
|
||||||
|
|
||||||
readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" }
|
readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,6 +84,12 @@ QtObject {
|
|||||||
*/
|
*/
|
||||||
property int shortDuration: units.shortDuration
|
property int shortDuration: units.shortDuration
|
||||||
|
|
||||||
|
/**
|
||||||
|
* units.veryShortDuration should be used for elements that should have a hint of smoothness,
|
||||||
|
* but otherwise animate near instantly.
|
||||||
|
*/
|
||||||
|
property int veryShortDuration: units.veryShortDuration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* units.veryLongDuration should be used for specialty animations that benefit
|
* units.veryLongDuration should be used for specialty animations that benefit
|
||||||
* from being even longer than longDuration.
|
* from being even longer than longDuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user