mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-16 17:22:45 -04:00
feat: add Display Profiles builtin control center widget (#2410)
* feat: add Display Profiles builtin control center widget Adds a new built-in widget that lets users switch between their configured display profiles directly from the Control Center, without opening Settings. - Widget shows the active profile name and cycles profiles on pill click - Detail panel shows all profiles as a button group for direct selection - Integrates with existing DisplayConfigState/SettingsData singletons - Follows the same loader/instance pattern as VPN, CUPS, and Tailscale widgets * fix: refine display profiles widget behavior
This commit is contained in:
@@ -135,6 +135,12 @@ Item {
|
||||
}
|
||||
builtinInstance = widgetModel.tailscaleBuiltinInstance;
|
||||
}
|
||||
if (builtinId === "builtin_display_profiles") {
|
||||
if (widgetModel?.displayProfilesLoader) {
|
||||
widgetModel.displayProfilesLoader.active = true;
|
||||
}
|
||||
builtinInstance = widgetModel.displayProfilesBuiltinInstance;
|
||||
}
|
||||
|
||||
if (!builtinInstance || !builtinInstance.ccDetailContent) {
|
||||
return;
|
||||
|
||||
@@ -924,6 +924,12 @@ Column {
|
||||
}
|
||||
builtinInstance = Qt.binding(() => root.model?.tailscaleBuiltinInstance);
|
||||
}
|
||||
if (id === "builtin_display_profiles") {
|
||||
if (root.model?.displayProfilesLoader) {
|
||||
root.model.displayProfilesLoader.active = true;
|
||||
}
|
||||
builtinInstance = Qt.binding(() => root.model?.displayProfilesBuiltinInstance);
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: {
|
||||
|
||||
Reference in New Issue
Block a user