fix: button comps' styling

This commit is contained in:
2 * r + 2 * t 2026-06-09 15:39:12 +10:00
parent 0d37255873
commit ac13eec68c
3 changed files with 4 additions and 4 deletions

View file

@ -21,7 +21,7 @@ StyledRect {
property alias shapeMorph: stateLayer.shapeMorph property alias shapeMorph: stateLayer.shapeMorph
property bool fillWidth // For ButtonRow property bool fillWidth // For ButtonRow
property font font property font font: Tokens.font.body.small
property int type: ButtonBase.Filled property int type: ButtonBase.Filled
property real padding property real padding

View file

@ -48,12 +48,11 @@ ButtonBase {
id: iconLabel id: iconLabel
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.topMargin: Math.round(fontInfo.pointSize * 0.0575)
color: root.onColour color: root.onColour
fill: root.internalChecked ? 1 : 0 fill: root.internalChecked ? 1 : 0
fontStyle: { fontStyle: {
const f = Qt.font(root.font); const f = Qt.font(root.font);
f.pointSize = Math.round(root.font.pointSize * 1.1); f.pointSize = Math.round(root.font.pointSize * 1.2);
return f; return f;
} }
@ -68,7 +67,7 @@ ButtonBase {
id: label id: label
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.topMargin: -Math.round(iconLabel.fontInfo.pointSize * 0.0575) Layout.topMargin: 1
color: root.onColour color: root.onColour
font: root.font font: root.font
} }

View file

@ -39,5 +39,6 @@ ButtonBase {
anchors.centerIn: parent anchors.centerIn: parent
color: root.onColour color: root.onColour
font: root.font
} }
} }