aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-05-23 10:57:02 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-05-23 09:20:00 +0000
commitab71cd2439dba00c751becd91dcf111b8ec38ba9 (patch)
tree2b94d23d57212526ddf6c6531b2ff5b27ac6fb20 /src/imports
parentbd1e79de9c0b5073ca299d65e0696ecad94f6fc5 (diff)
Button: revert automatic label layouting
It got ugly and hackish, and broke for QQuickButton subclasses. Instead, use simple and pretty bindings (thanks to newly introduced contentWidth and contentHeight) to give the label a default size and position. Change-Id: I4cd705e86a12e8c9ffa0b7a768b1878bba797036 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/Button.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index 708dc845..c0c4033c 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -53,6 +53,11 @@ AbstractButton {
//! [label]
label: Text {
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.contentWidth
+ height: control.contentHeight
+
text: control.text
color: control.Theme.selectedTextColor
horizontalAlignment: Text.AlignHCenter