NPanel positioning fixes
This commit is contained in:
parent
ee50d84a53
commit
6fba9d9f22
5 changed files with 141 additions and 28 deletions
|
|
@ -30,10 +30,11 @@ Variants {
|
|||
|
||||
screen: modelData
|
||||
|
||||
// Position based on bar location, like Notification popup does
|
||||
// Position at top of screen, always allow horizontal centering
|
||||
anchors {
|
||||
top: Settings.data.bar.position === "top"
|
||||
bottom: Settings.data.bar.position === "bottom"
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
// Set a width instead of anchoring left/right so we can click on the side of the toast
|
||||
|
|
@ -45,6 +46,8 @@ Variants {
|
|||
// Set margins based on bar position
|
||||
margins.top: Settings.data.bar.position === "top" ? (Style.barHeight + Style.marginS + (Settings.data.bar.floating ? Settings.data.bar.marginTop : 0)) * scaling : 0
|
||||
margins.bottom: Settings.data.bar.position === "bottom" ? (Style.barHeight + Style.marginS + (Settings.data.bar.floating ? Settings.data.bar.marginBottom : 0)) * scaling : 0
|
||||
margins.right: (Settings.data.bar.position === "left" || Settings.data.bar.position === "top" || Settings.data.bar.position === "bottom") ? Style.marginM * scaling : 0
|
||||
margins.left: Settings.data.bar.position === "right" ? Style.marginM * scaling : 0
|
||||
|
||||
// Transparent background
|
||||
color: Color.transparent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue