1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-22 19:15:24 -04:00

feat(wallpaper): support configurable background color (#2671)

* feat(wallpaper): support configurable background color

* chore(translations): update settings search index

* revert(wallpaper): keep Pad naming instead of Center
This commit is contained in:
Huỳnh Thiện Lộc
2026-06-21 14:57:08 +07:00
committed by GitHub
parent 8610b915ec
commit 4cbe766cbd
9 changed files with 103 additions and 11 deletions
@@ -354,6 +354,28 @@ Item {
}
}
ColorDropdownRow {
tab: "wallpaper"
tags: ["background", "color", "fill", "fit", "custom"]
settingKey: "wallpaperBackgroundColorMode"
text: I18n.tr("Background Color")
description: I18n.tr("Color shown for areas not covered by wallpaper (e.g. Fit or Pad modes)")
visible: root.currentWallpaper !== "" && !root.currentWallpaper.startsWith("#")
dropdownWidth: 220
options: [
{ "value": "black", "label": I18n.tr("Black") },
{ "value": "white", "label": I18n.tr("White") },
{ "value": "primary", "label": I18n.tr("Primary Theme Color") },
{ "value": "surface", "label": I18n.tr("Surface Container") },
{ "value": "custom", "label": I18n.tr("Custom") }
]
currentMode: SettingsData.wallpaperBackgroundColorMode
customColor: SettingsData.wallpaperBackgroundCustomColor || "#000000"
pickerTitle: I18n.tr("Wallpaper Background Color")
onModeSelected: mode => SettingsData.set("wallpaperBackgroundColorMode", mode)
onCustomColorSelected: selectedColor => SettingsData.set("wallpaperBackgroundCustomColor", selectedColor.toString())
}
Rectangle {
width: parent.width
height: 1