summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/Radio.qml13
-rw-r--r--app/main.cpp2
2 files changed, 14 insertions, 1 deletions
diff --git a/app/Radio.qml b/app/Radio.qml
index f812af1..894b9a3 100644
--- a/app/Radio.qml
+++ b/app/Radio.qml
@@ -24,6 +24,9 @@ import 'api' as API
ApplicationWindow {
id: root
+ width: container.width * container.scale
+ height: container.height * container.scale
+
API.Binding {
id: radio
@@ -37,6 +40,13 @@ ApplicationWindow {
}
}
+ Item {
+ id: container
+ anchors.centerIn: parent
+ width: 1080
+ height: 1487
+ scale: screenInfo.scale_factor()
+
ColumnLayout {
anchors.fill: parent
Item {
@@ -64,7 +74,7 @@ ApplicationWindow {
ColumnLayout {
anchors.fill: parent
- anchors.margins: root.width * 0.02
+ anchors.margins: container.width * 0.02
Item {
Layout.fillWidth: true
Layout.fillHeight: true
@@ -259,3 +269,4 @@ ApplicationWindow {
}
}
}
+}
diff --git a/app/main.cpp b/app/main.cpp
index 1d24a8a..0fb066c 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -98,6 +98,8 @@ int main(int argc, char *argv[])
if(qwm->init(port,secret) != 0){
exit(EXIT_FAILURE);
}
+ AGLScreenInfo screenInfo(qwm->get_scale_factor());
+ engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo);
// Request a surface as described in layers.json windowmanager’s file
if (qwm->requestSurface(myname) != 0) {
exit(EXIT_FAILURE);