From d7fc0ad0b87bcf32b6cff322bb2d3ebe91856043 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 9 Sep 2019 11:20:59 -0400 Subject: [PATCH] HButtonContent: Enable label eliding --- src/qml/Base/HButton.qml | 14 +++++++++----- src/qml/Base/HButtonContent.qml | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qml/Base/HButton.qml b/src/qml/Base/HButton.qml index 8d7b5265..e2f34287 100644 --- a/src/qml/Base/HButton.qml +++ b/src/qml/Base/HButton.qml @@ -14,11 +14,15 @@ Button { icon.color: theme.icons.colorize enabled: ! loading - // Must be explicitely set to display correctly on KDE, but no need on i3? - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) + // Must be explicitely set to display correctly on KDE + implicitWidth: Math.max( + implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding + ) + implicitHeight: Math.max( + implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding + ) readonly property alias iconItem: contentItem.icon diff --git a/src/qml/Base/HButtonContent.qml b/src/qml/Base/HButtonContent.qml index 3129b494..be91a266 100644 --- a/src/qml/Base/HButtonContent.qml +++ b/src/qml/Base/HButtonContent.qml @@ -83,6 +83,7 @@ HRowLayout { color: buttonTheme.text horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight Layout.fillWidth: true Layout.fillHeight: true