Skip to content

Commit 5760ce3

Browse files
authored
Merge pull request #8214 from nextcloud/backport/8201/stable-3.16
[stable-3.16] fix(gui): resize sharee search results list dependent on required space
2 parents 7c996d3 + d92cca1 commit 5760ce3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/gui/filedetails/ShareeSearchField.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,18 @@ TextField {
161161
id: suggestionsPopup
162162

163163
width: root.width
164-
height: 100
165164
y: root.height
166165

167166
contentItem: ScrollView {
168167
id: suggestionsScrollView
169168

170169
clip: true
171170
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
171+
ScrollBar.vertical.policy: shareeListView.contentHeight > shareeListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
172+
173+
// need to take the popup's padding in account for the max height
174+
// remove bottomPadding twice to leave some space between the window border
175+
implicitHeight: Math.min(Window.height - parent.y - parent.topPadding - parent.bottomPadding * 2, contentHeight)
172176

173177
ListView {
174178
id: shareeListView

0 commit comments

Comments
 (0)