NPanel: simplified screen/scaling management
This commit is contained in:
parent
6ea1e2b4c7
commit
82ac49ce85
28 changed files with 120 additions and 163 deletions
|
|
@ -11,16 +11,10 @@ NPanel {
|
|||
id: root
|
||||
|
||||
// Panel configuration
|
||||
panelWidth: {
|
||||
var w = Math.round(Math.max(screen?.width * 0.3, 500) * scaling)
|
||||
w = Math.min(w, screen?.width - Style.marginL * 2)
|
||||
return w
|
||||
}
|
||||
panelHeight: {
|
||||
var h = Math.round(Math.max(screen?.height * 0.5, 600) * scaling)
|
||||
h = Math.min(h, screen?.height - Style.barHeight * scaling - Style.marginL * 2)
|
||||
return h
|
||||
}
|
||||
preferredWidth: 500
|
||||
preferredWidthRatio: 0.3
|
||||
preferredHeight: 600
|
||||
preferredHeightRatio: 0.5
|
||||
|
||||
panelKeyboardFocus: true
|
||||
panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue