aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--homescreen/qml/main.qml2
-rw-r--r--homescreen/src/main.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml
index 1312e87..96a1950 100644
--- a/homescreen/qml/main.qml
+++ b/homescreen/qml/main.qml
@@ -32,7 +32,7 @@ Window {
anchors.centerIn: parent
width: 1080
height: 1920
- scale: 1.0
+ scale: screenInfo.scale_factor()
source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
ColumnLayout {
diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp
index 19bb0d3..2c6e26d 100644
--- a/homescreen/src/main.cpp
+++ b/homescreen/src/main.cpp
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
parser.addVersionOption();
parser.process(a);
QStringList positionalArguments = parser.positionalArguments();
-
+
int port = 1700;
QString token = "wm";
@@ -96,6 +96,8 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ AGLScreenInfo screenInfo(layoutHandler->get_scale_factor());
+
if (layoutHandler->requestSurface(QString("HomeScreen")) != 0) {
exit(EXIT_FAILURE);
}
@@ -134,6 +136,7 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("homescreenHandler", homescreenHandler);
engine.rootContext()->setContextProperty("launcher", launcher);
engine.rootContext()->setContextProperty("weather", new Weather(bindingAddress));
+ engine.rootContext()->setContextProperty("screenInfo", &screenInfo);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
QObject *root = engine.rootObjects().first();