forked from Shinonome/dots-hyprland
fix some auto resizing issue on items
This commit is contained in:
@@ -21,7 +21,6 @@ Item {
|
|||||||
|
|
||||||
property Component itemDelegate: null
|
property Component itemDelegate: null
|
||||||
property real maxPopupHeight: 300
|
property real maxPopupHeight: 300
|
||||||
property real popupWidth: dropdownButton.width
|
|
||||||
|
|
||||||
property real buttonRadius: dropdownButton.height / 2
|
property real buttonRadius: dropdownButton.height / 2
|
||||||
property color buttonBackground: Appearance.colors.colSecondaryContainer
|
property color buttonBackground: Appearance.colors.colSecondaryContainer
|
||||||
@@ -152,7 +151,7 @@ Item {
|
|||||||
|
|
||||||
parent: root.findWindowRoot()
|
parent: root.findWindowRoot()
|
||||||
|
|
||||||
width: root.popupWidth
|
width: Math.max(dropdownButton.width, optionColumn.implicitWidth + 16)
|
||||||
height: Math.min(optionColumn.implicitHeight + 16, root.maxPopupHeight)
|
height: Math.min(optionColumn.implicitHeight + 16, root.maxPopupHeight)
|
||||||
|
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
@@ -162,12 +161,13 @@ Item {
|
|||||||
id: scrollView
|
id: scrollView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 8
|
anchors.margins: 8
|
||||||
|
contentWidth: optionColumn.implicitWidth
|
||||||
contentHeight: optionColumn.implicitHeight
|
contentHeight: optionColumn.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: optionColumn
|
id: optionColumn
|
||||||
width: scrollView.width
|
width: Math.max(implicitWidth, scrollView.width)
|
||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|||||||
Reference in New Issue
Block a user