radiobutton: fix inaccurate height

This commit is contained in:
end-4
2025-07-23 10:26:16 +07:00
parent 5b4ccd9d59
commit 7bafa57989
2 changed files with 3 additions and 1 deletions
@@ -69,6 +69,7 @@ Item {
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
currentIndex: root.defaultChoice !== undefined ? root.items.indexOf(root.defaultChoice) : -1 currentIndex: root.defaultChoice !== undefined ? root.items.indexOf(root.defaultChoice) : -1
spacing: 6
model: ScriptModel { model: ScriptModel {
id: choiceModel id: choiceModel
@@ -10,7 +10,7 @@ import Quickshell.Services.Pipewire
RadioButton { RadioButton {
id: root id: root
implicitHeight: 40 implicitHeight: contentItem.implicitHeight + 4 * 2
property string description property string description
property color activeColor: Appearance?.colors.colPrimary ?? "#685496" property color activeColor: Appearance?.colors.colPrimary ?? "#685496"
property color inactiveColor: Appearance?.m3colors.m3onSurfaceVariant ?? "#45464F" property color inactiveColor: Appearance?.m3colors.m3onSurfaceVariant ?? "#45464F"
@@ -20,6 +20,7 @@ RadioButton {
indicator: Item{} indicator: Item{}
contentItem: RowLayout { contentItem: RowLayout {
id: contentItem
Layout.fillWidth: true Layout.fillWidth: true
spacing: 12 spacing: 12
Rectangle { Rectangle {