From 83c4034d6374eb8b6d5a72c053c7e774cd6c3ffc Mon Sep 17 00:00:00 2001 From: Tadao Tanikawa Date: Wed, 1 Aug 2018 07:07:49 +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: I6e71fd0a2c9cf5fbcf23ea529a094b74da6c1841 Signed-off-by: Tadao Tanikawa --- launcher/src/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'launcher/src/main.cpp') diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index ea3ed74..91a1d80 100644 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -100,6 +100,8 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); + if (layoutHandler->requestSurface(myname) != 0) { exit(EXIT_FAILURE); } @@ -156,9 +158,10 @@ int main(int argc, char *argv[]) // mail.qml loading QQmlApplicationEngine engine; - engine.rootContext()->setContextProperty("layoutHandler", layoutHandler); - engine.rootContext()->setContextProperty("homescreenHandler", homescreenHandler); - engine.rootContext()->setContextProperty("launcher", launcher); + engine.rootContext()->setContextProperty(QStringLiteral("layoutHandler"), layoutHandler); + engine.rootContext()->setContextProperty(QStringLiteral("homescreenHandler"), homescreenHandler); + engine.rootContext()->setContextProperty(QStringLiteral("launcher"), launcher); + engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); engine.load(QUrl(QStringLiteral("qrc:/Launcher.qml"))); QObject *root = engine.rootObjects().first(); -- cgit 1.2.3-korg