diff --git a/src/declarativeimports/plasmastyle/ButtonStyle.qml b/src/declarativeimports/plasmastyle/ButtonStyle.qml index 7ca4bfdda..88860dca9 100644 --- a/src/declarativeimports/plasmastyle/ButtonStyle.qml +++ b/src/declarativeimports/plasmastyle/ButtonStyle.qml @@ -71,14 +71,16 @@ QtQuickControlStyle.ButtonStyle { PlasmaComponents.Label { id: label - Layout.alignment: Qt.AlignVCenter + Layout.fillHeight: true text: Util.stylizeEscapedMnemonics(Util.toHtmlEscaped(control.text)) textFormat: Text.StyledText + height: undefined font: control.font || theme.defaultFont visible: control.text != "" Layout.fillWidth: true color: theme.buttonTextColor horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter + verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } diff --git a/src/declarativeimports/plasmastyle/ToolButtonStyle.qml b/src/declarativeimports/plasmastyle/ToolButtonStyle.qml index 3e9ce302a..aee58c391 100644 --- a/src/declarativeimports/plasmastyle/ToolButtonStyle.qml +++ b/src/declarativeimports/plasmastyle/ToolButtonStyle.qml @@ -94,7 +94,8 @@ QtQuickControlStyle.ButtonStyle { PlasmaComponents.Label { id: label Layout.minimumWidth: implicitWidth - Layout.alignment: Qt.AlignVCenter + Layout.fillHeight: true + height: undefined text: Util.stylizeEscapedMnemonics(Util.toHtmlEscaped(control.text)) textFormat: Text.StyledText font: control.font || theme.defaultFont @@ -102,6 +103,7 @@ QtQuickControlStyle.ButtonStyle { Layout.fillWidth: true color: (controlHovered || !flat) && buttonsurfaceChecker.usedPrefix != "toolbutton-hover" ? theme.buttonTextColor : PlasmaCore.ColorScope.textColor horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter + verticalAlignment: Text.AlignVCenter elide: Text.ElideRight }