1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

feat: Implement Color Picker

This commit is contained in:
purian23
2025-09-13 22:02:48 -04:00
parent 07c1677145
commit ba6c7ae28c
5 changed files with 127 additions and 2 deletions

View File

@@ -21,7 +21,9 @@ PanelWindow {
property var modelData
property var notepadVariants: null
signal colorPickerRequested()
function getNotepadInstanceForScreen() {
if (!notepadVariants || !notepadVariants.instances) return null
@@ -370,7 +372,8 @@ PanelWindow {
"network_speed_monitor": networkComponent,
"keyboard_layout_name": keyboardLayoutNameComponent,
"vpn": vpnComponent,
"notepadButton": notepadButtonComponent
"notepadButton": notepadButtonComponent,
"colorPicker": colorPickerComponent
})
function getWidgetComponent(widgetId) {
@@ -999,9 +1002,24 @@ PanelWindow {
}
}
}
Component {
id: colorPickerComponent
ColorPicker {
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight
section: topBarContent.getWidgetSection(parent) || "right"
parentScreen: root.screen
onColorPickerRequested: {
root.colorPickerRequested()
}
}
}
}
}
}
}
}
}