1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-15 07:35:20 -04:00

feat(notifications): user-configurable font size for notification summary and body (#2461)

* feat(notifications): add user-configurable font size for summary and body in notification popups

* feat: add Unset for falling back to previous default values

* fix: prek hook errors

---------

Co-authored-by: Klesh Wong <kleshwong@gmail.com>
This commit is contained in:
Klesh Wong
2026-06-12 03:40:33 +08:00
committed by GitHub
parent 29e8470f2e
commit 08fd6e26d8
5 changed files with 37 additions and 2 deletions
@@ -200,12 +200,40 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
SettingsCard {
width: parent.width
iconName: "notifications"
title: I18n.tr("Notification Popups")
settingKey: "notificationPopups"
// Font size selectors for summary and body
SettingsDropdownRow {
settingKey: "notificationSummaryFontSize"
tags: ["notification", "font", "summary", "size"]
text: I18n.tr("Summary Font Size")
description: I18n.tr("Set the font size for notification summary text")
options: [I18n.tr("Unset"), "10", "12", "14", "16", "18"]
currentValue: (SettingsData.notificationSummaryFontSize || I18n.tr("Unset")).toString()
onValueChanged: value => {
SettingsData.set("notificationSummaryFontSize", Number(value === I18n.tr("Unset") ? 0 : value));
SettingsData.sendTestNotifications();
}
}
SettingsDropdownRow {
settingKey: "notificationBodyFontSize"
tags: ["notification", "font", "body", "size"]
text: I18n.tr("Body Font Size")
description: I18n.tr("Set the font size for notification body text (htmlBody)")
options: [I18n.tr("Unset"), "10", "12", "14", "16", "18"]
currentValue: (SettingsData.notificationBodyFontSize || I18n.tr("Unset")).toString()
onValueChanged: value => {
SettingsData.set("notificationBodyFontSize", Number(value === I18n.tr("Unset") ? 0 : value));
SettingsData.sendTestNotifications();
}
}
SettingsDropdownRow {
settingKey: "notificationPopupPosition"
tags: ["notification", "popup", "position", "screen", "location"]