1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

no background opt for topbar

This commit is contained in:
bbedward
2025-08-23 17:45:18 -04:00
parent 8eaa1a2d7e
commit 1dfc7dc26e
20 changed files with 123 additions and 52 deletions

View File

@@ -12,13 +12,15 @@ Rectangle {
property var parentScreen: null
property real widgetHeight: 30
property real barHeight: 48
readonly property real horizontalPadding: SettingsData.topBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30))
signal clicked
width: 40
width: notificationIcon.width + horizontalPadding * 2
height: widgetHeight
radius: Theme.cornerRadius
radius: SettingsData.topBarNoBackground ? 0 : Theme.cornerRadius
color: {
if (SettingsData.topBarNoBackground) return "transparent"
const baseColor = notificationArea.containsMouse
|| root.isActive ? Theme.primaryPressed : Theme.secondaryHover
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b,
@@ -26,6 +28,7 @@ Rectangle {
}
DankIcon {
id: notificationIcon
anchors.centerIn: parent
name: SessionData.doNotDisturb ? "notifications_off" : "notifications"
size: Theme.iconSize - 6
@@ -40,8 +43,8 @@ Rectangle {
color: Theme.error
anchors.right: parent.right
anchors.top: parent.top
anchors.rightMargin: 6
anchors.topMargin: 6
anchors.rightMargin: SettingsData.topBarNoBackground ? 0 : 6
anchors.topMargin: SettingsData.topBarNoBackground ? 0 : 6
visible: root.hasUnread
}