fix(SeedPhrasePopup): fixed popup size when there is 1 item in the list. (#15639)

Fixes: #15478
This commit is contained in:
Roman Chornii 2024-07-19 18:41:57 +03:00 committed by GitHub
parent ecec94b1ff
commit 357ba99495
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -147,7 +147,7 @@ Item {
if (textToCheck === "") {
return;
}
for (var i = 0; i < inputList.count; i++) {
if (inputList.get(i).seedWord.startsWith(textToCheck)) {
filteredList.insert(filteredList.count, {"seedWord": inputList.get(i).seedWord});
@ -191,7 +191,7 @@ Item {
break;
}
}
root.keyPressed(event);
}
onEditClicked: {
@ -206,11 +206,14 @@ Item {
Popup {
id: suggListContainer
contentWidth: seedSuggestionsList.width
contentHeight: ((seedSuggestionsList.count <= 5) ? seedSuggestionsList.count : 5) *34 + 16
contentHeight: ((seedSuggestionsList.count <= 5) ? seedSuggestionsList.count : 5) *34
x: 16
y: seedWordInput.height + 4
topPadding: 8
bottomPadding: 8
leftPadding: 0
rightPadding: 0
visible: ((filteredList.count > 0) && seedWordInput.input.edit.activeFocus)
background: Rectangle {
id: statusMenuBackgroundContent
@ -242,6 +245,7 @@ Item {
clip: true
ScrollBar.vertical: ScrollBar { }
model: root.filteredList
delegate: Item {
id: txtDelegate
width: suggWord.contentWidth