aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
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" }