mirror of
https://github.com/monero-project/monero-gui
synced 2024-11-25 10:47:19 +01:00
29 lines
1.1 KiB
QML
29 lines
1.1 KiB
QML
import QtQuick 2.9
|
|
|
|
import "." as MoneroComponents
|
|
import "effects/" as MoneroEffects
|
|
|
|
Text {
|
|
// When using this component, please note that if you use a color different
|
|
// than `defaultFontColor`, you are required to also define `themeTransitionXColor`.
|
|
// If you do not set these the component will receive the wrong color after a transition.
|
|
// If you do not want to set these, use `themeTransition: false`.
|
|
id: root
|
|
property bool themeTransition: true
|
|
property string themeTransitionBlackColor: ""
|
|
property string themeTransitionWhiteColor: ""
|
|
font.family: MoneroComponents.Style.fontMedium.name
|
|
font.bold: false
|
|
font.pixelSize: 14
|
|
textFormat: Text.PlainText
|
|
|
|
MoneroEffects.ColorTransition {
|
|
enabled: root.themeTransition
|
|
themeTransition: root.themeTransition
|
|
targetObj: root
|
|
duration: 750
|
|
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
|
|
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
|
|
}
|
|
}
|