aboutsummaryrefslogtreecommitdiff
path: root/qml/CommandInput.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/CommandInput.qml')
-rw-r--r--qml/CommandInput.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/qml/CommandInput.qml b/qml/CommandInput.qml
index c4e6302..1f67f7c 100644
--- a/qml/CommandInput.qml
+++ b/qml/CommandInput.qml
@@ -21,6 +21,7 @@ Item {
property int fontSize : 12
property string fontFamily : "Monospace"
property color fontColor : "white"
+ property color errorColor : "red"
}
onVisibleChanged: container.reset()
@@ -121,11 +122,15 @@ Item {
}
function error(msg) {
- text += '<i><font color="red">' + msg + '</font></i>';
+ text = '<i><font color="'
+ + settings.errorColor
+ + '">'
+ + msg
+ + '</font></i>';
}
onTextChanged: {
- if ( text === '' ) {
+ if ( isInitial() ) {
Layout.preferredHeight = 0;
} else {
Layout.preferredHeight = contentHeight;