Fix HButton height for icon-only buttons
The button only considered its label previously to calculate its implicit height.
This commit is contained in:
parent
b8264d123c
commit
58e7321941
|
@ -8,8 +8,7 @@ Button {
|
||||||
id: button
|
id: button
|
||||||
enabled: ! button.loading
|
enabled: ! button.loading
|
||||||
spacing: theme.spacing
|
spacing: theme.spacing
|
||||||
topPadding:
|
topPadding: padded ? spacing * (circle ? 1 : 0.5) : 0
|
||||||
padded ? spacing * (circle ? (iconItem.small ? 1.5 : 1.8) : 0.5) : 0
|
|
||||||
bottomPadding: topPadding
|
bottomPadding: topPadding
|
||||||
leftPadding: padded ? spacing : 0
|
leftPadding: padded ? spacing : 0
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
|
|
|
@ -26,6 +26,8 @@ HRowLayout {
|
||||||
|
|
||||||
Layout.preferredWidth:
|
Layout.preferredWidth:
|
||||||
button.loading ? busyIndicatorLoader.width : icon.width
|
button.loading ? busyIndicatorLoader.width : icon.width
|
||||||
|
Layout.preferredHeight:
|
||||||
|
button.loading ? busyIndicatorLoader.height : icon.height
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
Loading…
Reference in New Issue
Block a user