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

feat: Opt to display notifications over fullscreen apps

This commit is contained in:
purian23
2025-08-10 08:15:59 -04:00
parent a73da19db2
commit 11173aac96
3 changed files with 90 additions and 3 deletions

View File

@@ -45,6 +45,11 @@ Item {
width: parent.width
sourceComponent: dynamicThemeComponent
}
Loader {
width: parent.width
sourceComponent: notificationOverlayComponent
}
}
}
@@ -879,4 +884,69 @@ Item {
}
}
}
// Notification Overlay Component
Component {
id: notificationOverlayComponent
StyledRect {
width: parent.width
height: notificationOverlaySection.implicitHeight + Theme.spacingL * 2
radius: Theme.cornerRadius
color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g,
Theme.surfaceVariant.b, 0.3)
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
Theme.outline.b, 0.2)
border.width: 1
Column {
id: notificationOverlaySection
anchors.fill: parent
anchors.margins: Theme.spacingL
spacing: Theme.spacingM
Row {
width: parent.width
spacing: Theme.spacingM
DankIcon {
name: "notifications_active"
size: Theme.iconSize
color: Theme.primary
anchors.verticalCenter: parent.verticalCenter
}
Column {
width: parent.width - Theme.iconSize - Theme.spacingM - overlayToggle.width - Theme.spacingM
spacing: Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: "Notification Overlay"
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Enable to display all notification priorities over fullscreen apps"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
width: parent.width
}
}
DankToggle {
id: overlayToggle
anchors.verticalCenter: parent.verticalCenter
checked: SettingsData.notificationOverlayEnabled
onToggled: toggled => SettingsData.setNotificationOverlayEnabled(toggled)
}
}
}
}
}
}