fix(StatusTagSelector): Fixed Layout issues when shrinking (#714)

Closes https://github.com/status-im/status-desktop/issues/5954
This commit is contained in:
Alexandra Betouni 2022-06-09 14:41:05 +03:00 committed by GitHub
parent 5f7bd307ef
commit 648406c442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -216,14 +216,15 @@ Item {
spacing: 8 spacing: 8
StatusBaseText { StatusBaseText {
Layout.preferredWidth: 22 Layout.preferredWidth: 22
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft Layout.alignment: Qt.AlignVCenter
color: Theme.palette.baseColor1 color: Theme.palette.baseColor1
text: root.toLabelText text: root.toLabelText
visible: (parent.width>22)
} }
ScrollView { ScrollView {
Layout.preferredWidth: (namesList.contentWidth > (parent.width - 177)) ? Layout.preferredWidth: (parent.width - 177) > 0 ? ((namesList.contentWidth > (parent.width - 177)) ?
(parent.width - 177) : namesList.contentWidth (parent.width - 177) : namesList.contentWidth) : 0
implicitHeight: 30 implicitHeight: 30
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
visible: (namesList.count > 0) visible: (namesList.count > 0)
@ -289,6 +290,7 @@ Item {
font.family: Theme.palette.baseFont.name font.family: Theme.palette.baseFont.name
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 44 Layout.preferredHeight: 44
visible: (parent.width>22)
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)) === ""