From d9cfdc3b69eea53cc060eec2230f74c847789c40 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Thu, 3 Dec 2015 23:27:27 +0100 Subject: Better theme information page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bit nicer layout so my eyes don't insta-bleed when checking this page. Also add information about the size of the rootItem, that's really useful to know what kind of constraints we're dealing with. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/ThemeTest.qml | 21 ++++++++++++++------- qt-mobile/qml/main.qml | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/ThemeTest.qml b/qt-mobile/qml/ThemeTest.qml index b65bc9eef..5c1384ca8 100644 --- a/qt-mobile/qml/ThemeTest.qml +++ b/qt-mobile/qml/ThemeTest.qml @@ -5,10 +5,10 @@ import org.kde.plasma.mobilecomponents 0.2 as MobileComponents GridLayout { id: themetest columns: 2 + anchors.margins: MobileComponents.Units.gridUnit - MobileComponents.Label { + MobileComponents.Heading { Layout.columnSpan: 2 - Layout.fillHeight: true text: "Theme Information" } @@ -17,14 +17,21 @@ GridLayout { } MobileComponents.Label { - text: "MobileComponents.Units.gridUnit:" + text: "Geometry:" + } + MobileComponents.Label { + text: rootItem.width + "x" + rootItem.height + } + + MobileComponents.Label { + text: "Units.gridUnit:" } MobileComponents.Label { text: MobileComponents.Units.gridUnit } MobileComponents.Label { - text: "MobileComponents.Units.devicePixelRatio:" + text: "Units.devicePixelRatio:" } MobileComponents.Label { text: MobileComponents.Units.devicePixelRatio @@ -46,20 +53,20 @@ GridLayout { } MobileComponents.Label { - text: "hand-computed devicePixelRatio:" + text: "FontMetrics devicePixelRatio:" } MobileComponents.Label { text: fm.height / fm.font.pointSize } - Text { + MobileComponents.Label { text: "Text item pixelSize:" } Text { text: font.pixelSize } - Text { + MobileComponents.Label { text: "Text item pointSize:" } Text { diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 6340b8667..5bfb6c591 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -9,6 +9,7 @@ import org.subsurfacedivelog.mobile 1.0 import org.kde.plasma.mobilecomponents 0.2 as MobileComponents MobileComponents.ApplicationWindow { + id: rootItem title: qsTr("Subsurface mobile") property bool fullscreen: true -- cgit v1.2.3-70-g09d2