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

View file

@ -69,6 +69,7 @@ Item {
Layout.fillHeight: true
clip: true
currentIndex: root.defaultChoice !== undefined ? root.items.indexOf(root.defaultChoice) : -1
spacing: 6
model: ScriptModel {
id: choiceModel

View file

@ -10,7 +10,7 @@ import Quickshell.Services.Pipewire
RadioButton {
id: root
implicitHeight: 40
implicitHeight: contentItem.implicitHeight + 4 * 2
property string description
property color activeColor: Appearance?.colors.colPrimary ?? "#685496"
property color inactiveColor: Appearance?.m3colors.m3onSurfaceVariant ?? "#45464F"
@ -20,6 +20,7 @@ RadioButton {
indicator: Item{}
contentItem: RowLayout {
id: contentItem
Layout.fillWidth: true
spacing: 12
Rectangle {