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/TextPlainArea.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/TextPlainArea.qml')
| -rw-r--r-- | components/TextPlainArea.qml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/components/TextPlainArea.qml b/components/TextPlainArea.qml new file mode 100644 index 00000000..700e674f --- /dev/null +++ b/components/TextPlainArea.qml @@ -0,0 +1,48 @@ +import QtQuick 2.9 +import QtQuick.Controls 2.0 + +import "." as MoneroComponents + +TextArea { + id: textArea + property bool themeTransition: true + property string colorWhiteTheme: "" + property string colorBlackTheme: "" + color: MoneroComponents.Style.defaultFontColor + font.family: MoneroComponents.Style.fontRegular.name + font.pixelSize: 14 * scaleRatio + selectByMouse: false + wrapMode: Text.WordWrap; + textMargin: 0 + leftPadding: 0 + topPadding: 0 + readOnly: true + textFormat: TextEdit.PlainText + + states: [ + State { + name: "black"; + when: textArea.themeTransition && MoneroComponents.Style.blackTheme + PropertyChanges { + target: textArea + color: { + return textArea.colorBlackTheme ? textArea.colorBlackTheme : MoneroComponents.Style._b_defaultFontColor + } + } + }, State { + name: "white"; + when: textArea.themeTransition && !MoneroComponents.Style.blackTheme + PropertyChanges { + target: textArea + color: { + return textArea.colorWhiteTheme ? textArea.colorWhiteTheme : MoneroComponents.Style._w_defaultFontColor + } + } + } + ] + + transitions: Transition { + enabled: appWindow.themeTransition + ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 750 } + } +} |
