1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-11 16:22:09 -04:00

widgets: cleanup rectangles across popouts, modals, OSDs

This commit is contained in:
bbedward
2026-02-14 11:15:26 -05:00
parent 2b78fe5b9f
commit 44a45b00cf
16 changed files with 31 additions and 254 deletions

View File

@@ -4,7 +4,6 @@ import Quickshell
import Quickshell.Wayland
import qs.Common
import qs.Services
import qs.Widgets
PanelWindow {
id: root
@@ -260,11 +259,13 @@ PanelWindow {
readonly property real popupSurfaceAlpha: SettingsData.popupTransparency
readonly property real effectiveShadowAlpha: Math.max(0, Math.min(1, shadowBaseAlpha * popupSurfaceAlpha * osdContainer.opacity))
DankRectangle {
Rectangle {
id: background
anchors.fill: parent
radius: Theme.cornerRadius
color: Theme.withAlpha(Theme.surfaceContainer, osdContainer.popupSurfaceAlpha)
border.color: Theme.outlineMedium
border.width: 1
z: -1
}
@@ -293,9 +294,12 @@ PanelWindow {
}
}
DankRectangle {
Rectangle {
anchors.fill: parent
radius: Theme.cornerRadius
color: Theme.surfaceContainer
border.color: Theme.outlineMedium
border.width: 1
}
}

View File

@@ -4,7 +4,6 @@ import Quickshell
import Quickshell.Wayland
import qs.Common
import qs.Services
import qs.Widgets
Item {
id: root
@@ -467,10 +466,12 @@ Item {
}
}
DankRectangle {
Rectangle {
anchors.fill: parent
radius: Theme.cornerRadius
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
border.color: Theme.outlineMedium
border.width: 1
}
Loader {

View File

@@ -1,54 +0,0 @@
import QtQuick
import QtQuick.Shapes
import qs.Common
Item {
id: root
property color color: Theme.surfaceContainer
property color borderColor: Theme.outlineMedium
property real borderWidth: 1
property real radius: Theme.cornerRadius
property color overlayColor: "transparent"
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: root.color
strokeColor: root.borderColor
strokeWidth: root.borderWidth
startX: root.radius
startY: 0
PathLine { x: root.width - root.radius; y: 0 }
PathQuad { x: root.width; y: root.radius; controlX: root.width; controlY: 0 }
PathLine { x: root.width; y: root.height - root.radius }
PathQuad { x: root.width - root.radius; y: root.height; controlX: root.width; controlY: root.height }
PathLine { x: root.radius; y: root.height }
PathQuad { x: 0; y: root.height - root.radius; controlX: 0; controlY: root.height }
PathLine { x: 0; y: root.radius }
PathQuad { x: root.radius; y: 0; controlX: 0; controlY: 0 }
}
ShapePath {
fillColor: root.overlayColor
strokeColor: "transparent"
strokeWidth: 0
startX: root.radius
startY: 0
PathLine { x: root.width - root.radius; y: 0 }
PathQuad { x: root.width; y: root.radius; controlX: root.width; controlY: 0 }
PathLine { x: root.width; y: root.height - root.radius }
PathQuad { x: root.width - root.radius; y: root.height; controlX: root.width; controlY: root.height }
PathLine { x: root.radius; y: root.height }
PathQuad { x: 0; y: root.height - root.radius; controlX: 0; controlY: root.height }
PathLine { x: 0; y: root.radius }
PathQuad { x: root.radius; y: 0; controlX: 0; controlY: 0 }
}
}
}