diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-07-23 11:19:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-29 11:06:06 +0200 |
commit | 09ed33677124a81117a10f1f5a47d7fae1ef22a8 (patch) | |
tree | b6ad054f5800fa407a9a25a20e1b9383a5d4ff14 /examples/quick | |
parent | d5b4e460bde0c152da5b872ac8ed6f675bf227a9 (diff) |
Make buttons and tabs larger in QML examples and dialogs
Task-number: QTBUG-32578
Change-Id: Ic89058abc55e5e079f44862986b2132114456147
Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/dialogs/systemdialogs/ColorDialogs.qml | 5 | ||||
-rw-r--r-- | examples/quick/dialogs/systemdialogs/FileDialogs.qml | 5 | ||||
-rw-r--r-- | examples/quick/shared/Button.qml | 7 | ||||
-rw-r--r-- | examples/quick/shared/TabSet.qml | 5 |
4 files changed, 14 insertions, 8 deletions
diff --git a/examples/quick/dialogs/systemdialogs/ColorDialogs.qml b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml index cd74dd6766..0cb42a01aa 100644 --- a/examples/quick/dialogs/systemdialogs/ColorDialogs.qml +++ b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml @@ -115,15 +115,16 @@ Rectangle { right: parent.right bottom: parent.bottom } - height: 50 + height: buttonRow.height * 1.2 color: Qt.darker(palette.window, 1.1) border.color: Qt.darker(palette.window, 1.3) Row { + id: buttonRow spacing: 6 anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 12 - height: parent.height - 6 + height: implicitHeight width: parent.width Button { text: "Open" diff --git a/examples/quick/dialogs/systemdialogs/FileDialogs.qml b/examples/quick/dialogs/systemdialogs/FileDialogs.qml index c8c5d13885..b8df5e0f14 100644 --- a/examples/quick/dialogs/systemdialogs/FileDialogs.qml +++ b/examples/quick/dialogs/systemdialogs/FileDialogs.qml @@ -138,15 +138,16 @@ Rectangle { right: parent.right bottom: parent.bottom } - height: 50 + height: buttonRow.height * 1.2 color: Qt.darker(palette.window, 1.1) border.color: Qt.darker(palette.window, 1.3) Row { + id: buttonRow spacing: 6 anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 12 - height: parent.height - 6 + height: implicitHeight width: parent.width Button { text: "Open" diff --git a/examples/quick/shared/Button.qml b/examples/quick/shared/Button.qml index 551f7d6e04..468f945934 100644 --- a/examples/quick/shared/Button.qml +++ b/examples/quick/shared/Button.qml @@ -39,6 +39,7 @@ ****************************************************************************/ import QtQuick 2.1 +import QtQuick.Window 2.1 Item { id: container @@ -48,8 +49,8 @@ Item { signal clicked property alias containsMouse: mouseArea.containsMouse property alias pressed: mouseArea.pressed - implicitHeight: buttonLabel.implicitHeight * 1.2 - implicitWidth: buttonLabel.implicitWidth * 1.2 + implicitHeight: Math.max(Screen.logicalPixelDensity * 7, buttonLabel.implicitHeight * 1.2) + implicitWidth: Math.max(Screen.logicalPixelDensity * 11, buttonLabel.implicitWidth * 1.3) height: implicitHeight width: implicitWidth @@ -64,7 +65,7 @@ Item { GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) } } antialiasing: true - radius: height / 4 + radius: height / 6 border.color: Qt.darker(palette.button, 1.5) border.width: 1 } diff --git a/examples/quick/shared/TabSet.qml b/examples/quick/shared/TabSet.qml index 10263a70ac..86050b6073 100644 --- a/examples/quick/shared/TabSet.qml +++ b/examples/quick/shared/TabSet.qml @@ -39,6 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Window 2.1 Item { id: tabWidget @@ -65,7 +66,8 @@ Item { Repeater { model: stack.children.length delegate: Rectangle { - width: tabWidget.width / stack.children.length; height: 36 + width: tabWidget.width / stack.children.length + height: Math.max(Screen.logicalPixelDensity * 11, label.implicitHeight * 1.2) Rectangle { width: parent.width; height: 1 @@ -79,6 +81,7 @@ Item { visible: tabWidget.current == index } Text { + id: label horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter anchors.fill: parent text: stack.children[index].title |