diff options
| author | dsc <xmrdsc@protonmail.com> | 2019-04-11 03:17:29 +0200 |
|---|---|---|
| committer | dsc <xmrdsc@protonmail.com> | 2019-04-24 05:37:35 +0200 |
| commit | 42f7afaefddbf5a7929ddf88dbe7b27e7f40a669 (patch) | |
| tree | cbbe7fc3e3950354f7a4dcb925b6e1e9dc62efd8 /components/TextPlain.qml | |
| parent | 358e1d23facbd10fefbb2bf04c45b98f0c728ad0 (diff) | |
| download | monzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.tar.gz monzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.tar.xz monzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.zip | |
White theme
Diffstat (limited to 'components/TextPlain.qml')
| -rw-r--r-- | components/TextPlain.qml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/TextPlain.qml b/components/TextPlain.qml new file mode 100644 index 00000000..2bc05042 --- /dev/null +++ b/components/TextPlain.qml @@ -0,0 +1,28 @@ +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 * scaleRatio + 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 + } +} |
