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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user