diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-04-24 19:12:20 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-04-28 08:24:47 +0000 |
commit | 5df44d55b5230a39f512e36e308569f28c80264b (patch) | |
tree | 3fe974e29dd3641ed3580ac9f6ab912932478480 /src/imports | |
parent | 1590f21ad105b239f129d52b5eebd14f23b926bb (diff) |
Button: provide a default size for the label delegate
If the label delegate has no explicit size defined, make it follow the
size of the button minus padding. This should be a convenient default
behavior that satisfies the most users, and saves a few of QML bindings.
Makes also the upcoming "the default delegate implementation looks like
this" -snippet nice and short. ;)
Change-Id: I574439c1e52c2904746be7d830f9536d4cfd9083
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/controls/Button.qml | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml index 6ce91739..7cf1424d 100644 --- a/src/imports/controls/Button.qml +++ b/src/imports/controls/Button.qml @@ -52,11 +52,6 @@ AbstractButton { padding: Theme.padding label: Text { - x: control.leftPadding - y: control.topPadding - width: parent.width - control.leftPadding - control.rightPadding - height: parent.height - control.topPadding - control.bottomPadding - text: control.text color: control.Theme.selectedTextColor elide: Text.ElideRight |