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