fix(StatusTagSelector):Create new chat input is single line

This commit is contained in:
mishkarogachev 2022-05-10 09:48:04 +03:00 committed by r4bbit.eth
parent 0f511ebc60
commit 5def2102c7
1 changed files with 5 additions and 3 deletions

View File

@ -237,16 +237,18 @@ Item {
TextInput { TextInput {
id: edit id: edit
Layout.fillWidth: true
Layout.preferredHeight: 44
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: (namesModel.count < 5) visible: (namesModel.count < 5)
enabled: visible enabled: visible
focus: true focus: true
color: Theme.palette.directColor1
clip: true
font.pixelSize: 15 font.pixelSize: 15
wrapMode: TextEdit.NoWrap wrapMode: TextEdit.NoWrap
font.family: Theme.palette.baseFont.name font.family: Theme.palette.baseFont.name
color: Theme.palette.directColor1 Layout.fillWidth: true
Layout.preferredHeight: 44
Keys.onPressed: { Keys.onPressed: {
if ((event.key === Qt.Key_Backspace || event.key === Qt.Key_Escape) if ((event.key === Qt.Key_Backspace || event.key === Qt.Key_Escape)
&& getText(cursorPosition, (cursorPosition-1)) === "" && getText(cursorPosition, (cursorPosition-1)) === ""