less weird no text selection buttons

This commit is contained in:
end-4
2025-10-06 10:09:19 +02:00
parent 122c1f8e37
commit d6e9e9f2a5
@@ -23,7 +23,7 @@ GroupButton {
colBackgroundActive: Appearance.colors.colSecondaryContainerActive
contentItem: RowLayout {
spacing: 4
spacing: 4 * (root.buttonText?.length > 0)
Loader {
Layout.alignment: Qt.AlignVCenter
@@ -42,7 +42,7 @@ GroupButton {
}
Item {
implicitWidth: textItem.implicitWidth
implicitWidth: root.buttonText?.length > 0 ? textItem.implicitWidth : 0
implicitHeight: textMetrics.height // Force height to that of regular text
TextMetrics {