Skip to content

Commit

Permalink
Added handling for eglfs screens
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Gagi2k committed Mar 31, 2016
1 parent 7505985 commit d53ea69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ClusterAndHUD.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Main {
width: 1920
visible: true

color: "black"

Cluster {}
}

Expand Down
11 changes: 11 additions & 0 deletions Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d53ea69

Please sign in to comment.