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

feat: Rebuilt DankColorPicker w/Color Sampling

- Fully custom built ColorDialog
- Replaces previous Wallpaper background color tool
- Requires hyprpicker for color sampling, thanks @Vaxry
This commit is contained in:
purian23
2025-10-05 22:18:26 -04:00
parent 2dc310dcbc
commit 523422cf6c
6 changed files with 599 additions and 213 deletions

View File

@@ -252,7 +252,19 @@ Item {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
colorPicker.open()
if (PopoutService.colorPickerModal) {
var currentWallpaper = SessionData.perMonitorWallpaper ? SessionData.getMonitorWallpaper(selectedMonitorName) : SessionData.wallpaperPath
PopoutService.colorPickerModal.selectedColor = currentWallpaper.startsWith("#") ? currentWallpaper : Theme.primary
PopoutService.colorPickerModal.pickerTitle = "Choose Wallpaper Color"
PopoutService.colorPickerModal.onColorSelectedCallback = function(selectedColor) {
if (SessionData.perMonitorWallpaper) {
SessionData.setMonitorWallpaper(selectedMonitorName, selectedColor)
} else {
SessionData.setWallpaperColor(selectedColor)
}
}
PopoutService.colorPickerModal.show()
}
}
}
}
@@ -1853,18 +1865,4 @@ Item {
}
}
}
DankColorPicker {
id: colorPicker
pickerTitle: "Choose Wallpaper Color"
onColorSelected: selectedColor => {
if (SessionData.perMonitorWallpaper) {
SessionData.setMonitorWallpaper(selectedMonitorName, selectedColor)
} else {
SessionData.setWallpaperColor(selectedColor)
}
}
}
}