1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-25 10:47:19 +01:00
monero-gui/components/TextPlainArea.qml

49 lines
1.4 KiB
QML
Raw Normal View History

2019-04-11 03:17:29 +02:00
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
2019-04-25 21:09:23 +02:00
font.pixelSize: 14
2019-04-11 03:17:29 +02:00
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 }
}
}