fix: button comps' styling
This commit is contained in:
parent
0d37255873
commit
ac13eec68c
3 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,6 @@ ButtonBase {
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: root.onColour
|
color: root.onColour
|
||||||
|
font: root.font
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue