diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-01-15 17:10:57 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-17 13:56:21 +0100 |
commit | 9597ef65410aedf998d157681d327f590029d47f (patch) | |
tree | b4e10fb39a883ebae969c5f3ad5640512b5fe0f9 /examples/quick/shared/Button.qml | |
parent | c8a04f9412c1e765a98be86387fd848ca7ea6993 (diff) |
Improve the look and feel of our demo launcher
The existing demo launcher looks rather ugly. This does some
visual tweaks to make it look better, including adding support
for proper text wrapping.
It was approved by our design lead Diana.
Change-Id: I660764575a411f598c53c9c42e290a807e20c0cf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'examples/quick/shared/Button.qml')
-rw-r--r-- | examples/quick/shared/Button.qml | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/examples/quick/shared/Button.qml b/examples/quick/shared/Button.qml index ca20d6d3b5..9bbc01ac01 100644 --- a/examples/quick/shared/Button.qml +++ b/examples/quick/shared/Button.qml @@ -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 } } } |