[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-desktop] applets/kickoff/package/contents/ui: Constrain kickoff config button label size
From:       David Edmundson <kde () davidedmundson ! co ! uk>
Date:       2016-09-30 21:36:26
Message-ID: E1bq5Tm-0002PD-IT () code ! kde ! org
[Download RAW message or body]

Git commit 77dad58290769e2e1223c1275b8e074c8e8ff3bd by David Edmundson.
Committed on 30/09/2016 at 21:26.
Pushed by davidedmundson into branch 'master'.

Constrain kickoff config button label size

Summary:
A better way to achieve center aligning is to use the alignment property
of QtQuick.Text.

This looks the same but because we now have left and right anchors text
gets elided properly rather than overflowing out the box.

Test Plan: Opened, looks identical

Reviewers: #plasma

Subscribers: jsalatas, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2901

M  +4    -1    applets/kickoff/package/contents/ui/KickoffConfigurationButt=
on.qml

http://commits.kde.org/plasma-desktop/77dad58290769e2e1223c1275b8e074c8e8ff=
3bd

diff --git a/applets/kickoff/package/contents/ui/KickoffConfigurationButton=
.qml b/applets/kickoff/package/contents/ui/KickoffConfigurationButton.qml
index ef95dec..31bf05f 100644
--- a/applets/kickoff/package/contents/ui/KickoffConfigurationButton.qml
+++ b/applets/kickoff/package/contents/ui/KickoffConfigurationButton.qml
@@ -48,8 +48,11 @@ PlasmaCore.FrameSvgItem {
         id: textElement
         anchors {
             top: iconElement.bottom
-            horizontalCenter: parent.horizontalCenter
+            left: parent.left
+            right: parent.right
         }
+        horizontalAlignment: Text.AlignHCenter
+        elide: Text.ElideRight
         color: PlasmaCore.ColorScope.textColor
         font.pointSize: theme.smallestFont.pointSize
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic