From 31e1daa04663c2b8c3735ae8e68d5138e87a8c5f Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 7 Sep 2019 17:00:12 -0400 Subject: [PATCH] Set placeholder text color for text field and area --- TODO.md | 1 - src/qml/Base/HScrollableTextArea.qml | 1 + src/qml/Base/HTextField.qml | 1 + src/themes/Default.qpl | 10 ++++++---- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 5e2f2647..031f0026 100644 --- a/TODO.md +++ b/TODO.md @@ -26,7 +26,6 @@ - Verify big avatars aren't downloaded uselessly - UI - - Set an explicit placeholder text color for text field/area - Show error if uploading avatar fails or file is corrupted - Way to open context menus without a right mouse button - Room header descriptions: styled text diff --git a/src/qml/Base/HScrollableTextArea.qml b/src/qml/Base/HScrollableTextArea.qml index b7ca0221..4888caf5 100644 --- a/src/qml/Base/HScrollableTextArea.qml +++ b/src/qml/Base/HScrollableTextArea.qml @@ -30,6 +30,7 @@ ScrollView { font.pixelSize: theme.fontSize.normal font.pointSize: -1 + placeholderTextColor: theme.controls.textArea.placeholderText color: theme.controls.textArea.text background: Rectangle { id: textAreaBackground diff --git a/src/qml/Base/HTextField.qml b/src/qml/Base/HTextField.qml index 88ae0715..d4f9620c 100644 --- a/src/qml/Base/HTextField.qml +++ b/src/qml/Base/HTextField.qml @@ -24,6 +24,7 @@ TextField { property color focusedBorderColor: _tf.focusedBorder property alias radius: textFieldBackground.radius + placeholderTextColor: _tf.placeholderText color: activeFocus ? _tf.focusedText : _tf.text background: Rectangle { diff --git a/src/themes/Default.qpl b/src/themes/Default.qpl index c0aac2de..05b73e76 100644 --- a/src/themes/Default.qpl +++ b/src/themes/Default.qpl @@ -152,12 +152,14 @@ controls: color focusedBorder: colors.accentBackground color errorBorder: colors.negativeBackground - color text: colors.text - color focusedText: colors.text + color text: colors.text + color focusedText: colors.text + color placeholderText: colors.dimText textArea: - color background: colors.inputBackground - color text: colors.text + color background: colors.inputBackground + color text: colors.text + color placeholderText: controls.textField.placeholderText toolTip: int delay: 500