diff options
author | Johanna Aijala <johanna.aijala@digia.com> | 2013-02-21 09:17:06 +0200 |
---|---|---|
committer | Johanna Aijala <johanna.aijala@digia.com> | 2013-02-21 09:21:34 +0200 |
commit | d9e4b5c1820e62700756ede2ef5290baccc3c1b2 (patch) | |
tree | cc6975c1bd3ea86e4b7e5373560603e5165b7ff4 /examples/quick/shared/Button.qml | |
parent | f4d4689d3c09cb4eae30be892be426d4fa185ed4 (diff) | |
parent | fb7ab18fa799032f37fd6f78ab34b76aff91ed6c (diff) |
Merge branch 'stable' into release
Change-Id: I13e80072db1e2c14a37b6a123276be81b085e87e
Diffstat (limited to 'examples/quick/shared/Button.qml')
-rw-r--r-- | examples/quick/shared/Button.qml | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/examples/quick/shared/Button.qml b/examples/quick/shared/Button.qml index 9b2b5f39f4..9bbc01ac01 100644 --- a/examples/quick/shared/Button.qml +++ b/examples/quick/shared/Button.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. @@ -46,19 +46,46 @@ Item { property string text: "Button" property string subText: "" signal clicked + property alias containsMouse: mouseArea.containsMouse + property alias pressed: mouseArea.pressed + implicitHeight: col.height + height: implicitHeight + width: buttonLabel.width + 20 - width: buttonLabel.width + 20; height: col.height + 12 - - MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked() + hoverEnabled: true + } Column { spacing: 2 id: col + anchors.verticalCenter: parent.verticalCenter + width: parent.width Text { - id: buttonLabel; text: container.text; color: "black"; font.pixelSize: 24 + id: buttonLabel + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.right: parent.right + anchors.rightMargin: 10 + text: container.text + color: "black" + font.pixelSize: 22 + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + styleColor: "white" + style: Text.Raised + } Text { - id: buttonLabel2; text: container.subText; color: "black"; font.pixelSize: 12 + id: buttonLabel2 + anchors.left: parent.left + anchors.leftMargin: 10 + text: container.subText + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + color: "#666" + font.pixelSize: 12 } } } |