Set a maximum dp to avoid too big display on large screens
This commit is contained in:
parent
9daaf523e3
commit
7abfe4508c
1 changed files with 2 additions and 1 deletions
|
|
@ -46,7 +46,8 @@ QtObject {
|
||||||
|
|
||||||
property real defaultHeight: 1080.0
|
property real defaultHeight: 1080.0
|
||||||
property real defaultWidth: 1920.0
|
property real defaultWidth: 1920.0
|
||||||
property double dp: (Screen.width/Screen.height)/(defaultWidth/defaultHeight)
|
property real maxDp: 0.98
|
||||||
|
property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp)
|
||||||
|
|
||||||
onDpChanged: {
|
onDpChanged: {
|
||||||
console.log("Screen ratio changed", dp)
|
console.log("Screen ratio changed", dp)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue