diff --git a/src/declarativeimports/plasmacomponents/qml/Button.qml b/src/declarativeimports/plasmacomponents/qml/Button.qml index 355945392..7a2c2378a 100644 --- a/src/declarativeimports/plasmacomponents/qml/Button.qml +++ b/src/declarativeimports/plasmacomponents/qml/Button.qml @@ -33,6 +33,7 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import "private" as Private + Item { id: button @@ -236,25 +237,15 @@ Item { active: shadow.hasOverState && mouse.containsMouse } - Text { + Label { id: label width: parent.width - icon.width - parent.spacing height: parent.height - - font.capitalization: theme.defaultFont.capitalization - font.family: theme.defaultFont.family - font.italic: theme.defaultFont.italic - font.letterSpacing: theme.defaultFont.letterSpacing - font.pointSize: theme.defaultFont.pointSize - font.strikeout: theme.defaultFont.strikeout - font.underline: theme.defaultFont.underline - font.weight: theme.defaultFont.weight - font.wordSpacing: theme.defaultFont.wordSpacing color: theme.buttonTextColor horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter - elide: button.width < button.implicitWidth ? Text.ElideRight : Text.ElideNone + elide: Text.ElideRight } } diff --git a/src/declarativeimports/plasmacomponents/qml/ToolButton.qml b/src/declarativeimports/plasmacomponents/qml/ToolButton.qml index a1ab0665d..96623be1f 100644 --- a/src/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/src/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -358,24 +358,15 @@ Item { active: delegate.item.hasOverState && mouse.containsMouse } - Text { + Label { id: label width: parent.width - icon.width - parent.spacing height: parent.height - font.capitalization: theme.defaultFont.capitalization - font.family: theme.defaultFont.family - font.italic: theme.defaultFont.italic - font.letterSpacing: theme.defaultFont.letterSpacing - font.pointSize: theme.defaultFont.pointSize - font.strikeout: theme.defaultFont.strikeout - font.underline: theme.defaultFont.underline - font.weight: theme.defaultFont.weight - font.wordSpacing: theme.defaultFont.wordSpacing - color: mouse.containsMouse ? theme.buttonTextColor : theme.textColor Behavior on color { ColorAnimation { duration: 100 } } + elide: Text.ElideRight horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter