aboutsummaryrefslogtreecommitdiffstats
path: root/Main.qml
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2016-03-30 16:04:22 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2016-03-31 11:21:31 +0000
commitd53ea69bc4cbc9c4ae1f0c26db36b5a81d27516b (patch)
treedf1fd23a22227614359ca9f600808e62066897b0 /Main.qml
parent75059856bd4626e396f912331e851ff63e328f88 (diff)
Added handling for eglfs screens
In this case the screens are bigger than what we support, so we want to fill the rest with a black background Change-Id: Ibd95e2f5345c88e9a09ea8a2362adc6f68bdc9fd Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Diffstat (limited to 'Main.qml')
-rw-r--r--Main.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/Main.qml b/Main.qml
index 3d5bbbd..0a9f5e2 100644
--- a/Main.qml
+++ b/Main.qml
@@ -41,6 +41,17 @@ Rectangle {
width: Style.screenWidth
height: Style.screenHeight
+ //If we run on eglfs or similar the window might be different to what we set it here
+ Window.onWidthChanged: {
+ if (Window.width > Style.screenWidth)
+ root.width = Window.width
+ }
+
+ Window.onHeightChanged: {
+ if (Window.height > Style.screenHeight)
+ root.height = Window.height
+ }
+
Item {
width: Style.screenWidth
height: Style.screenHeight