make selection buttons less weird with cjk

This commit is contained in:
end-4
2025-09-05 23:34:50 +02:00
parent 9114d5b2fe
commit f593ad0f2c
@@ -41,9 +41,22 @@ GroupButton {
}
}
StyledText {
color: root.toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnSecondaryContainer
text: root.buttonText
Item {
implicitWidth: textItem.implicitWidth
implicitHeight: textMetrics.height // Force height to that of regular text
TextMetrics {
id: textMetrics
font.family: Appearance.font.family.main
text: "Abc"
}
StyledText {
id: textItem
anchors.centerIn: parent
color: root.toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnSecondaryContainer
text: root.buttonText
}
}
}
}