fix(TextArea): fix selecting text in a TextArea and placeholder color

This commit is contained in:
Jonathan Rainville 2021-04-28 15:34:16 -04:00 committed by Iuri Matias
parent 2c3449e676
commit 7def4b8630
2 changed files with 2 additions and 10 deletions

View File

@ -110,7 +110,6 @@ ModalPopup {
anchors.top: nameInput.bottom anchors.top: nameInput.bottom
anchors.topMargin: Style.current.bigPadding anchors.topMargin: Style.current.bigPadding
customHeight: 88 customHeight: 88
textField.selectByMouse: true
textField.wrapMode: TextEdit.Wrap textField.wrapMode: TextEdit.Wrap
property bool isValid: false property bool isValid: false

View File

@ -52,6 +52,7 @@ Item {
id: textArea id: textArea
text: "" text: ""
font.pixelSize: 15 font.pixelSize: 15
selectByMouse: true
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
placeholderText: inputBox.placeholderText placeholderText: inputBox.placeholderText
anchors.rightMargin: Style.current.smallPadding anchors.rightMargin: Style.current.smallPadding
@ -61,19 +62,11 @@ Item {
anchors.fill: parent anchors.fill: parent
font.family: Style.current.fontRegular.name font.family: Style.current.fontRegular.name
color: Style.current.textColor color: Style.current.textColor
placeholderTextColor: Style.current.darkGrey placeholderTextColor: Style.current.secondaryText
selectionColor: Style.current.primarySelectionColor selectionColor: Style.current.primarySelectionColor
Keys.onPressed: inputBox.keyPressed(event) Keys.onPressed: inputBox.keyPressed(event)
} }
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: {
textArea.forceActiveFocus(Qt.MouseFocusReason)
}
}
} }
TextEdit { TextEdit {