mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 16:28:51 +02:00
[ui] Scroll available in FliterComboBox
This commit is contained in:
parent
aee13b5202
commit
b0f9427757
1 changed files with 7 additions and 3 deletions
|
@ -72,7 +72,7 @@ ComboBox {
|
|||
filterTextArea.forceActiveFocus()
|
||||
|
||||
if (mapToGlobal(popup.x, popup.y).y + root.implicitHeight * (model.length + 1) > _window.contentItem.height) {
|
||||
y = -root.implicitHeight * (model.length + 1)
|
||||
y = -((combo.height * (combo.model.length + 1) > _window.contentItem.height) ? _window.contentItem.height*2/3 : combo.height * (combo.model.length + 1))
|
||||
} else {
|
||||
y = 0
|
||||
}
|
||||
|
@ -137,15 +137,19 @@ ComboBox {
|
|||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
clip: true
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: filterTextArea.bottom
|
||||
|
||||
implicitHeight: contentHeight
|
||||
implicitHeight: (combo.height * (combo.model.length + 1) > _window.contentItem.height) ? _window.contentItem.height*2/3 : contentHeight
|
||||
model: combo.popup.visible ? combo.delegateModel : null
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator {}
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
visible: listView.contentHeight > listView.height
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue