From 5df44d55b5230a39f512e36e308569f28c80264b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 24 Apr 2015 19:12:20 +0200 Subject: 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 --- src/imports/controls/Button.qml | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/imports/controls') 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 -- cgit v1.2.3