HButtonContent: Enable label eliding

This commit is contained in:
miruka 2019-09-09 11:20:59 -04:00
parent 4ffa3470c7
commit d7fc0ad0b8
2 changed files with 10 additions and 5 deletions

View File

@ -14,11 +14,15 @@ Button {
icon.color: theme.icons.colorize icon.color: theme.icons.colorize
enabled: ! loading enabled: ! loading
// Must be explicitely set to display correctly on KDE, but no need on i3? // Must be explicitely set to display correctly on KDE
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitWidth: Math.max(
implicitContentWidth + leftPadding + rightPadding) implicitBackgroundWidth + leftInset + rightInset,
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentWidth + leftPadding + rightPadding
implicitContentHeight + topPadding + bottomPadding) )
implicitHeight: Math.max(
implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding
)
readonly property alias iconItem: contentItem.icon readonly property alias iconItem: contentItem.icon

View File

@ -83,6 +83,7 @@ HRowLayout {
color: buttonTheme.text color: buttonTheme.text
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true