From 1c58ba66da8feae72232ddc0a849bdebc3605fd5 Mon Sep 17 00:00:00 2001 From: Tadao Tanikawa Date: Thu, 2 Aug 2018 12:03:22 +0000 Subject: Improve output of multiple screen resolution To improve output on various monitor with various resolution, use scale_factor from WM to fit various screen resolution. Bug-AGL: SPEC-1568, SPEC-1569, SPEC-1611 Change-Id: I5159184b21f13138f520aa0b9c91b58544ac96c5 Signed-off-by: Tadao Tanikawa --- app/Dashboard.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/Dashboard.qml b/app/Dashboard.qml index 41ffbf8..496062b 100644 --- a/app/Dashboard.qml +++ b/app/Dashboard.qml @@ -24,6 +24,9 @@ import Translator 1.0 ApplicationWindow { id: root + width: container.width * container.scale + height: container.height * container.scale + Translator { id: translator } @@ -89,6 +92,13 @@ ApplicationWindow { active: true } + Item { + id: container + anchors.centerIn: parent + width: 1080 + height: 1487 + scale: screenInfo.scale_factor() + Label { id: speed anchors.left: parent.left @@ -278,9 +288,13 @@ ApplicationWindow { Button { text: model.modelData - onClicked: translator.language = model.modelData + onClicked: { + translator.language = model.modelData + console.log ("Scale = " + screenInfo.scale_factor()) + } Layout.fillWidth: true } } } } +} -- cgit 1.2.3-korg