mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
OSD: better shadow management
This commit is contained in:
@@ -140,8 +140,8 @@ Variants {
|
||||
readonly property bool isCentered: (location === "top" || location === "bottom")
|
||||
readonly property bool verticalMode: (location === "left" || location === "right")
|
||||
readonly property int hWidth: Math.round(420 * Style.uiScaleRatio)
|
||||
readonly property int hHeight: Math.round(84 * Style.uiScaleRatio)
|
||||
readonly property int vWidth: Math.round(92 * Style.uiScaleRatio)
|
||||
readonly property int hHeight: Math.round(72 * Style.uiScaleRatio)
|
||||
readonly property int vWidth: Math.round(84 * Style.uiScaleRatio)
|
||||
readonly property int vHeight: Math.round(380 * Style.uiScaleRatio)
|
||||
|
||||
// Ensure an even width to keep the vertical bar perfectly centered
|
||||
@@ -210,6 +210,10 @@ Variants {
|
||||
WlrLayershell.layer: (Settings.data.osd && Settings.data.osd.overlayLayer) ? WlrLayer.Overlay : WlrLayer.Top
|
||||
exclusionMode: PanelWindow.ExclusionMode.Ignore
|
||||
|
||||
// Rectangle {
|
||||
// anchors.fill: parent
|
||||
// color: "#4400FF00"
|
||||
// }
|
||||
Item {
|
||||
id: osdItem
|
||||
anchors.fill: parent
|
||||
@@ -255,7 +259,7 @@ Variants {
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginM * 2
|
||||
anchors.margins: Style.marginM * 1.5
|
||||
radius: Style.radiusL
|
||||
color: Color.mSurface
|
||||
border.color: Color.mOutline
|
||||
@@ -265,17 +269,17 @@ Variants {
|
||||
}
|
||||
}
|
||||
|
||||
// MultiEffect applied to background only
|
||||
NDropShadows {
|
||||
anchors.fill: background
|
||||
source: background
|
||||
autoPaddingEnabled: true
|
||||
}
|
||||
|
||||
// Content loader on top of the background (not affected by MultiEffect)
|
||||
Loader {
|
||||
id: contentLoader
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginL * 2
|
||||
anchors.fill: background
|
||||
anchors.margins: Style.marginM
|
||||
active: true
|
||||
sourceComponent: panel.verticalMode ? verticalContent : horizontalContent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user