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