[Button Styles] Use Layout.fillHeight instead of parent.height in a Layout
This fixes the label not being vertically centered if the button is smaller than its implicit height. This can happen with the global menu applet in a narrow panel. BUG: 375911 Differential Revision: https://phabricator.kde.org/D4436
This commit is contained in:
parent
1b02bfdff7
commit
c21ff749e6
@ -75,7 +75,7 @@ QtQuickControlStyle.ButtonStyle {
|
||||
font: control.font || theme.defaultFont
|
||||
visible: control.text != ""
|
||||
Layout.fillWidth: true
|
||||
height: parent.height
|
||||
Layout.fillHeight: true
|
||||
color: theme.buttonTextColor
|
||||
horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
@ -90,7 +90,7 @@ QtQuickControlStyle.ButtonStyle {
|
||||
font: control.font || theme.defaultFont
|
||||
visible: control.text != ""
|
||||
Layout.fillWidth: true
|
||||
height: parent.height
|
||||
Layout.fillHeight: true
|
||||
color: controlHovered || !flat ? theme.buttonTextColor : PlasmaCore.ColorScope.textColor
|
||||
horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
Loading…
x
Reference in New Issue
Block a user