SettingsPanel: Improved auto-sizing so it should work well on large and small screens
This commit is contained in:
parent
5a1faa0fd4
commit
de32b86f7c
1 changed files with 6 additions and 2 deletions
|
|
@ -11,10 +11,14 @@ import qs.Widgets
|
||||||
NPanel {
|
NPanel {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
panelWidth: Math.round(Math.max(screen?.width * 0.4, 1000) * scaling)
|
panelWidth: {
|
||||||
|
var width = Math.round(Math.max(screen?.width * 0.4, 1000) * scaling)
|
||||||
|
width = Math.min(width, screen?.width - Style.marginL * 2)
|
||||||
|
return width
|
||||||
|
}
|
||||||
panelHeight: {
|
panelHeight: {
|
||||||
var height = Math.round(Math.max(screen?.height * 0.75, 800) * scaling)
|
var height = Math.round(Math.max(screen?.height * 0.75, 800) * scaling)
|
||||||
height = Math.min(height, screen?.height - Style.barHeight * scaling)
|
height = Math.min(height, screen?.height - Style.barHeight * scaling - Style.marginL * 2)
|
||||||
return height
|
return height
|
||||||
}
|
}
|
||||||
panelAnchorHorizontalCenter: true
|
panelAnchorHorizontalCenter: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue