Skip to content

Commit e5e8dda

Browse files
committed
fix(search): preserve provider menu sizing
Apply the eight-row height cap only when the provider list overflows so Qt retains its implicit popup geometry for shorter lists. Update the chip regression expectation to match inherited button padding. Signed-off-by: Rello <github@scherello.de> Assisted-by: Codex:GPT-5
1 parent ceb7601 commit e5e8dda

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/gui/search/UnifiedSearchFilterBar.qml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ Flow {
5959
objectName: "typeFilterMenu"
6060
anchorItem: typeFilterButton
6161
width: anchorItem.width * Style.unifiedSearchFilterMenuWidthFactor
62-
height: Math.min(implicitHeight,
63-
Style.unifiedSearchProviderMenuMaximumVisibleRows
64-
* Style.standardPrimaryButtonHeight
65-
+ topPadding + bottomPadding)
62+
63+
Binding on height {
64+
when: root.searchModel
65+
&& root.searchModel.providers.length
66+
> Style.unifiedSearchProviderMenuMaximumVisibleRows
67+
value: Style.unifiedSearchProviderMenuMaximumVisibleRows
68+
* Style.standardPrimaryButtonHeight
69+
+ typeMenu.topPadding + typeMenu.bottomPadding
70+
}
6671

6772
Repeater {
6873
model: root.searchModel ? root.searchModel.providers : []

test/qml/search/testsearch.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Item {
524524
compare(chip.implicitHeight, Style.wizardChipButtonHeight)
525525
verify(chip.implicitHeight < dateButton.implicitHeight)
526526
compare(chip.background.radius, Style.veryRoundedButtonRadius)
527-
verify(chip.leftPadding < dateButton.leftPadding)
527+
compare(chip.leftPadding, dateButton.leftPadding)
528528
compare(chip.rightPadding, chip.leftPadding)
529529

530530
searchWindow.destroy()

0 commit comments

Comments
 (0)