Dropdown/SearchableDropdown: 4px spacing between popup rows
This commit is contained in:
@@ -124,8 +124,8 @@ Item {
|
||||
x: 0
|
||||
y: trigger.height + 2
|
||||
width: trigger.width
|
||||
implicitHeight: Math.min(root.options.length * root.popupRowHeight + 2,
|
||||
root.popupRowHeight * 8 + 2)
|
||||
implicitHeight: Math.min(root.options.length * root.popupRowHeight + Math.max(0, root.options.length - 1) * 4 + 2,
|
||||
root.popupRowHeight * 8 + 7 * 4 + 2)
|
||||
padding: 1
|
||||
focus: true
|
||||
|
||||
@@ -143,6 +143,7 @@ Item {
|
||||
|
||||
contentItem: ListView {
|
||||
id: optionList
|
||||
spacing: 4
|
||||
|
||||
Keys.onPressed: function(event) {
|
||||
if (event.key === Qt.Key_Escape) { popup.close(); event.accepted = true }
|
||||
|
||||
@@ -146,8 +146,8 @@ Item {
|
||||
y: trigger.height + 2
|
||||
width: trigger.width
|
||||
implicitHeight: Math.max(root.popupMinHeight,
|
||||
Math.min(root.filtered.length * root.popupRowHeight + 50,
|
||||
root.popupRowHeight * 6 + 50))
|
||||
Math.min(root.filtered.length * root.popupRowHeight + Math.max(0, root.filtered.length - 1) * 4 + 50,
|
||||
root.popupRowHeight * 6 + 5 * 4 + 50))
|
||||
padding: 1
|
||||
focus: true
|
||||
|
||||
@@ -229,6 +229,7 @@ Item {
|
||||
ListView {
|
||||
id: resultList
|
||||
anchors.fill: parent
|
||||
spacing: 4
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
model: root.filtered
|
||||
|
||||
Reference in New Issue
Block a user