From 8113ba468d51dce80b6990df5e98b06776166547 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 7 Sep 2019 17:02:09 -0400 Subject: [PATCH] HTextField: remove ugly _tf property --- src/qml/Base/HTextField.qml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/qml/Base/HTextField.qml b/src/qml/Base/HTextField.qml index d4f9620c..6824236b 100644 --- a/src/qml/Base/HTextField.qml +++ b/src/qml/Base/HTextField.qml @@ -12,20 +12,25 @@ TextField { font.pixelSize: theme.fontSize.normal font.pointSize: -1 - readonly property QtObject _tf: theme.controls.textField + placeholderTextColor: theme.controls.textField.placeholderText + color: activeFocus ? + theme.controls.textField.focusedText : + theme.controls.textField.text + property bool error: false - property bool bordered: true - property color backgroundColor: _tf.background - property color borderColor: _tf.border - property color errorBorder: _tf.errorBorder - property color focusedBackgroundColor: _tf.focusedBackground - property color focusedBorderColor: _tf.focusedBorder property alias radius: textFieldBackground.radius + property bool bordered: true + + property color backgroundColor: theme.controls.textField.background + property color borderColor: theme.controls.textField.border + property color errorBorder: theme.controls.textField.errorBorder + + property color focusedBackgroundColor: + theme.controls.textField.focusedBackground + property color focusedBorderColor: theme.controls.textField.focusedBorder - placeholderTextColor: _tf.placeholderText - color: activeFocus ? _tf.focusedText : _tf.text background: Rectangle { id: textFieldBackground