diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-04-11 13:01:14 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-04-11 11:20:05 +0000 |
commit | 7124ac6371ad192f27fa172a98f7096884f9f600 (patch) | |
tree | 000f3c7a20118840f37f25ec1ec8a21bce335e94 /src/imports/controls/Button.qml | |
parent | 3408d28e3c058c620f4dfb167a1e25c3618fc90f (diff) |
Buttons: remove superfluous alignment for the internal labels
In QQuickIconLabel::layout(), the label is resized to:
min(availableSize, implicitSize)
In other words, the label is never larger than its content. Specifying
an alignment has therefore zero effect. This saves a few unnecessary
QML expression evaluations and gives a few frames' boost in qmlbench.
Change-Id: Ifa942d99a026fd2dca6e680bde2b538f9e526604
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/Button.qml')
-rw-r--r-- | src/imports/controls/Button.qml | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml index 7e2eecd0..8a98bbad 100644 --- a/src/imports/controls/Button.qml +++ b/src/imports/controls/Button.qml @@ -76,8 +76,6 @@ T.Button { color: control.checked || control.highlighted ? Default.textLightColor : (control.visualFocus ? Default.focusColor : (control.down ? Default.textDarkColor : Default.textColor)) - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } } |