mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 12:08:53 +00:00
chore(general/ui): old animated text renamed to status color animation and moved to statusq
- Old component name `AnimatedText` renamed to `StatusColorAnimation` - Component moved from `ui/imports/shared/panels` to `ui/StatusQ/src/StatusQ/Controls` location
This commit is contained in:
parent
65cc5a7c55
commit
ff9532f921
62
ui/StatusQ/src/StatusQ/Controls/StatusColorAnimation.qml
Normal file
62
ui/StatusQ/src/StatusQ/Controls/StatusColorAnimation.qml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\qmltype StatusColorAnimation
|
||||||
|
\inherits SequentialAnimation
|
||||||
|
\inqmlmodule StatusQ.Controls
|
||||||
|
\since StatusQ.Controls 0.1
|
||||||
|
\brief Animates target property (that shold be a color property) from/to color to target component within set duration.
|
||||||
|
|
||||||
|
Example of how to use it:
|
||||||
|
|
||||||
|
\qml
|
||||||
|
StatusBaseText {
|
||||||
|
id: animatedText
|
||||||
|
|
||||||
|
onTextChanged: {
|
||||||
|
if (text === "") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
animate.restart()
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusColorAnimation {
|
||||||
|
id: animate
|
||||||
|
target: animatedText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\endqml
|
||||||
|
|
||||||
|
For a list of components available see StatusQ.
|
||||||
|
*/
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property var target
|
||||||
|
property string targetProperty: "color"
|
||||||
|
property color fromColor: Theme.palette.directColor1
|
||||||
|
property color toColor: Theme.palette.getColor(fromColor, 0.1)
|
||||||
|
property int duration: 500 // in milliseconds
|
||||||
|
|
||||||
|
loops: 3
|
||||||
|
alwaysRunToEnd: true
|
||||||
|
|
||||||
|
ColorAnimation {
|
||||||
|
target: root.target
|
||||||
|
property: root.targetProperty
|
||||||
|
from: root.fromColor
|
||||||
|
to: root.toColor
|
||||||
|
duration: root.duration
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorAnimation {
|
||||||
|
target: root.target
|
||||||
|
property: root.targetProperty
|
||||||
|
from: root.toColor
|
||||||
|
to: root.fromColor
|
||||||
|
duration: root.duration
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,7 @@ StatusChatListCategoryItemButton 0.1 StatusChatListCategoryItemButton.qml
|
|||||||
StatusCheckBox 0.1 StatusCheckBox.qml
|
StatusCheckBox 0.1 StatusCheckBox.qml
|
||||||
StatusCircularProgressBar 0.1 StatusCircularProgressBar.qml
|
StatusCircularProgressBar 0.1 StatusCircularProgressBar.qml
|
||||||
StatusClearButton 0.1 StatusClearButton.qml
|
StatusClearButton 0.1 StatusClearButton.qml
|
||||||
|
StatusColorAnimation 0.1 StatusColorAnimation.qml
|
||||||
StatusColorRadioButton 0.1 StatusColorRadioButton.qml
|
StatusColorRadioButton 0.1 StatusColorRadioButton.qml
|
||||||
StatusColorSelector 0.1 StatusColorSelector.qml
|
StatusColorSelector 0.1 StatusColorSelector.qml
|
||||||
StatusColorSelectorGrid 0.1 StatusColorSelectorGrid.qml
|
StatusColorSelectorGrid 0.1 StatusColorSelectorGrid.qml
|
||||||
|
@ -105,6 +105,7 @@
|
|||||||
<file>StatusQ/Controls/StatusCheckBox.qml</file>
|
<file>StatusQ/Controls/StatusCheckBox.qml</file>
|
||||||
<file>StatusQ/Controls/StatusCircularProgressBar.qml</file>
|
<file>StatusQ/Controls/StatusCircularProgressBar.qml</file>
|
||||||
<file>StatusQ/Controls/StatusClearButton.qml</file>
|
<file>StatusQ/Controls/StatusClearButton.qml</file>
|
||||||
|
<file>StatusQ/Controls/StatusColorAnimation.qml</file>
|
||||||
<file>StatusQ/Controls/StatusColorRadioButton.qml</file>
|
<file>StatusQ/Controls/StatusColorRadioButton.qml</file>
|
||||||
<file>StatusQ/Controls/StatusColorSelector.qml</file>
|
<file>StatusQ/Controls/StatusColorSelector.qml</file>
|
||||||
<file>StatusQ/Controls/StatusColorSelectorGrid.qml</file>
|
<file>StatusQ/Controls/StatusColorSelectorGrid.qml</file>
|
||||||
|
@ -505,7 +505,7 @@ StatusDialog {
|
|||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
loading: root.swapAdaptor.swapProposalLoading
|
loading: root.swapAdaptor.swapProposalLoading
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: animation
|
id: animation
|
||||||
target: fees
|
target: fees
|
||||||
}
|
}
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
import QtQuick 2.15
|
|
||||||
|
|
||||||
import StatusQ.Core.Theme 0.1
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property var target: null
|
|
||||||
property string targetProperty: "color"
|
|
||||||
property color fromColor: Theme.palette.directColor1
|
|
||||||
property color toColor: Theme.palette.getColor(fromColor, 0.1)
|
|
||||||
property int duration: 500 // in milliseconds
|
|
||||||
|
|
||||||
loops: 3
|
|
||||||
|
|
||||||
ColorAnimation {
|
|
||||||
target: root.target
|
|
||||||
property: root.targetProperty
|
|
||||||
from: root.fromColor
|
|
||||||
to: root.toColor
|
|
||||||
duration: root.duration
|
|
||||||
}
|
|
||||||
|
|
||||||
ColorAnimation {
|
|
||||||
target: root.target
|
|
||||||
property: root.targetProperty
|
|
||||||
from: root.toColor
|
|
||||||
to: root.fromColor
|
|
||||||
duration: root.duration
|
|
||||||
}
|
|
||||||
}
|
|
@ -18,4 +18,3 @@ Separator 1.0 Separator.qml
|
|||||||
SequenceColumnLayout 1.0 SequenceColumnLayout.qml
|
SequenceColumnLayout 1.0 SequenceColumnLayout.qml
|
||||||
StatusAssetSelector 1.0 StatusAssetSelector.qml
|
StatusAssetSelector 1.0 StatusAssetSelector.qml
|
||||||
StyledText 1.0 StyledText.qml
|
StyledText 1.0 StyledText.qml
|
||||||
AnimatedText 1.0 AnimatedText.qml
|
|
||||||
|
@ -52,7 +52,7 @@ StatusDialogFooter {
|
|||||||
estimatedTimeAnimation.restart()
|
estimatedTimeAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: estimatedTimeAnimation
|
id: estimatedTimeAnimation
|
||||||
target: estimatedTime
|
target: estimatedTime
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ StatusDialogFooter {
|
|||||||
feesAnimation.restart()
|
feesAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: feesAnimation
|
id: feesAnimation
|
||||||
target: fees
|
target: fees
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ SignTransactionModalBase {
|
|||||||
maxFeesAnimation.restart()
|
maxFeesAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: maxFeesAnimation
|
id: maxFeesAnimation
|
||||||
target: maxFees
|
target: maxFees
|
||||||
targetProperty: "customColor"
|
targetProperty: "customColor"
|
||||||
@ -148,7 +148,7 @@ SignTransactionModalBase {
|
|||||||
estimatedTimeAnimation.restart()
|
estimatedTimeAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: estimatedTimeAnimation
|
id: estimatedTimeAnimation
|
||||||
target: estimatedTime
|
target: estimatedTime
|
||||||
targetProperty: "customColor"
|
targetProperty: "customColor"
|
||||||
@ -224,7 +224,7 @@ SignTransactionModalBase {
|
|||||||
fiatFeesAnimation.restart()
|
fiatFeesAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: fiatFeesAnimation
|
id: fiatFeesAnimation
|
||||||
target: fiatFees
|
target: fiatFees
|
||||||
targetProperty: "customColor"
|
targetProperty: "customColor"
|
||||||
@ -250,7 +250,7 @@ SignTransactionModalBase {
|
|||||||
cryptoFeesAnimation.restart()
|
cryptoFeesAnimation.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedText {
|
StatusColorAnimation {
|
||||||
id: cryptoFeesAnimation
|
id: cryptoFeesAnimation
|
||||||
target: cryptoFees
|
target: cryptoFees
|
||||||
fromColor: cryptoFees.customColor
|
fromColor: cryptoFees.customColor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user