mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NPanel: simplified screen/scaling management
This commit is contained in:
@@ -11,16 +11,11 @@ import qs.Widgets
|
||||
NPanel {
|
||||
id: root
|
||||
|
||||
panelWidth: {
|
||||
var w = Math.round(Math.max(screen?.width * 0.4, 1000) * scaling)
|
||||
w = Math.min(w, screen?.width - Style.marginL * 2)
|
||||
return w
|
||||
}
|
||||
panelHeight: {
|
||||
var h = Math.round(Math.max(screen?.height * 0.75, 800) * scaling)
|
||||
h = Math.min(h, screen?.height - Style.barHeight * scaling - Style.marginL * 2)
|
||||
return h
|
||||
}
|
||||
preferredWidth: 1000
|
||||
preferredHeight: 1000
|
||||
preferredWidthRatio: 0.4
|
||||
preferredHeightRatio: 0.75
|
||||
|
||||
panelAnchorHorizontalCenter: true
|
||||
panelAnchorVerticalCenter: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user