mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-02 10:37:50 +00:00
SettingsPanel: Improved auto-sizing so it should work well on large and small screens
This commit is contained in:
@@ -11,10 +11,14 @@ import qs.Widgets
|
||||
NPanel {
|
||||
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: {
|
||||
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
|
||||
}
|
||||
panelAnchorHorizontalCenter: true
|
||||
|
||||
Reference in New Issue
Block a user