aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-10-25 16:53:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-30 15:29:59 +0100
commit639553f024f7b03706553ebb34825591be75eed2 (patch)
tree452c75029eb0e4235acd7309190283e31d6ad9f4 /examples
parent7af741357be05429e21965b7bbb487ff09aea94b (diff)
QtQuick examples make use of the new pixelDensity property
Change-Id: I273fc08405724158fbf7c7d410bfa38fef4600b1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/shared/Button.qml4
-rw-r--r--examples/quick/shared/TabSet.qml2
-rw-r--r--examples/quick/window/ScreenInfo.qml3
3 files changed, 6 insertions, 3 deletions
diff --git a/examples/quick/shared/Button.qml b/examples/quick/shared/Button.qml
index 468f945934..6f080e1b21 100644
--- a/examples/quick/shared/Button.qml
+++ b/examples/quick/shared/Button.qml
@@ -49,8 +49,8 @@ Item {
signal clicked
property alias containsMouse: mouseArea.containsMouse
property alias pressed: mouseArea.pressed
- implicitHeight: Math.max(Screen.logicalPixelDensity * 7, buttonLabel.implicitHeight * 1.2)
- implicitWidth: Math.max(Screen.logicalPixelDensity * 11, buttonLabel.implicitWidth * 1.3)
+ implicitHeight: Math.max(Screen.pixelDensity * 7, buttonLabel.implicitHeight * 1.2)
+ implicitWidth: Math.max(Screen.pixelDensity * 11, buttonLabel.implicitWidth * 1.3)
height: implicitHeight
width: implicitWidth
diff --git a/examples/quick/shared/TabSet.qml b/examples/quick/shared/TabSet.qml
index 1fdf476424..b71e84c9d6 100644
--- a/examples/quick/shared/TabSet.qml
+++ b/examples/quick/shared/TabSet.qml
@@ -69,7 +69,7 @@ Item {
model: stack.children.length
delegate: Rectangle {
width: tabWidget.width / stack.children.length
- height: Math.max(Screen.logicalPixelDensity * 11, label.implicitHeight * 1.2)
+ height: Math.max(Screen.pixelDensity * 7, label.implicitHeight * 1.2)
Rectangle {
width: parent.width; height: 1
diff --git a/examples/quick/window/ScreenInfo.qml b/examples/quick/window/ScreenInfo.qml
index e4abc8d69d..e422a51a71 100644
--- a/examples/quick/window/ScreenInfo.qml
+++ b/examples/quick/window/ScreenInfo.qml
@@ -79,6 +79,9 @@ Item {
Text { text: "dimensions" }
Text { text: Screen.width + "x" + Screen.height }
+ Text { text: "pixel density" }
+ Text { text: Screen.pixelDensity.toFixed(2) + " dots/mm" }
+
Text { text: "logical pixel density" }
Text { text: Screen.logicalPixelDensity.toFixed(2) + " dots/mm" }