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

feat(settings): add compositor section & restructured settings

- add dedicated Compositor pages for comp specifc features
- add Dank Bar Appearance subsection
- improve lazy loading, caching, search routing, & IPC navigation
- standardized responsive Setting categories from global animations
This commit is contained in:
purian23
2026-06-07 03:52:00 -04:00
parent 8155970ba2
commit 69f3dee25a
19 changed files with 2355 additions and 1503 deletions
+41 -23
View File
@@ -1,6 +1,7 @@
import QtQuick
import qs.Common
import qs.Modules.Settings
import qs.Widgets
FocusScope {
id: root
@@ -97,7 +98,24 @@ FocusScope {
visible: active
focus: active
sourceComponent: WorkspacesTab {}
sourceComponent: CompositorTab {}
onActiveChanged: {
if (active && item)
Qt.callLater(() => item.forceActiveFocus());
}
}
Loader {
id: dankBarAppearanceLoader
anchors.fill: parent
active: root.currentIndex === 6
visible: active
focus: active
sourceComponent: DankBarAppearanceTab {
parentModal: root.parentModal
}
onActiveChanged: {
if (active && item)
@@ -432,19 +450,36 @@ FocusScope {
Loader {
id: widgetsLoader
property bool loadedOnce: false
anchors.fill: parent
active: root.currentIndex === 22
visible: active
focus: active
active: root.currentIndex === 22 || loadedOnce
visible: root.currentIndex === 22 && status === Loader.Ready
focus: visible
asynchronous: true
sourceComponent: WidgetsTab {
parentModal: root.parentModal
}
onActiveChanged: {
if (active && item)
onLoaded: {
loadedOnce = true;
if (visible && item)
Qt.callLater(() => item.forceActiveFocus());
}
onVisibleChanged: {
if (visible && item)
Qt.callLater(() => item.forceActiveFocus());
}
}
StyledText {
anchors.centerIn: parent
visible: root.currentIndex === 22 && widgetsLoader.status === Loader.Loading
text: I18n.tr("Loading...", "loading indicator")
color: Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeMedium
}
Loader {
@@ -479,23 +514,6 @@ FocusScope {
}
}
Loader {
id: windowRulesLoader
anchors.fill: parent
active: root.currentIndex === 28
visible: active
focus: active
sourceComponent: WindowRulesTab {
parentModal: root.parentModal
}
onActiveChanged: {
if (active && item)
Qt.callLater(() => item.forceActiveFocus());
}
}
Loader {
id: audioLoader
anchors.fill: parent
+29 -21
View File
@@ -23,6 +23,7 @@ Rectangle {
property bool searchActive: searchField.text.length > 0
property int searchSelectedIndex: 0
property int keyboardHighlightIndex: -1
readonly property int navigationStateDuration: Theme.currentAnimationSpeed === SettingsData.AnimationSpeed.None ? 0 : Anims.settingsNavigationStateDuration
function focusSearch() {
searchField.forceActiveFocus();
@@ -115,6 +116,12 @@ Rectangle {
"icon": "tune",
"tabIndex": 3
},
{
"id": "dankbar_appearance",
"text": I18n.tr("Appearance"),
"icon": "palette",
"tabIndex": 6
},
{
"id": "dankbar_widgets",
"text": I18n.tr("Widgets"),
@@ -131,16 +138,10 @@ Rectangle {
},
{
"id": "workspaces_widgets",
"text": I18n.tr("Workspaces & Widgets"),
"text": I18n.tr("Widgets & Notifications"),
"icon": "dashboard",
"collapsedByDefault": true,
"children": [
{
"id": "workspaces",
"text": I18n.tr("Workspaces"),
"icon": "view_module",
"tabIndex": 4
},
{
"id": "media_player",
"text": I18n.tr("Media Player"),
@@ -187,6 +188,12 @@ Rectangle {
}
]
},
{
"id": "compositor",
"text": I18n.tr("Compositor"),
"icon": "layers",
"tabIndex": 4
},
{
"id": "keybinds",
"text": I18n.tr("Keyboard Shortcuts"),
@@ -305,13 +312,6 @@ Rectangle {
"text": I18n.tr("Users"),
"icon": "manage_accounts",
"tabIndex": 35
},
{
"id": "window_rules",
"text": I18n.tr("Window Rules"),
"icon": "select_window",
"tabIndex": 28,
"windowRulesCapable": true
}
]
},
@@ -544,6 +544,8 @@ Rectangle {
return -1;
var normalized = name.toLowerCase().replace(/[_\-\s]/g, "");
if (normalized === "workspaces")
normalized = "compositor";
for (var i = 0; i < categoryStructure.length; i++) {
var cat = categoryStructure[i];
@@ -588,7 +590,7 @@ Rectangle {
id: __m1
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
text: I18n.tr("Workspaces & Widgets")
text: I18n.tr("Widgets & Notifications")
}
StyledTextMetrics {
id: __m2
@@ -782,6 +784,7 @@ Rectangle {
id: resultRipple
rippleColor: root.searchSelectedIndex === resultDelegate.index ? Theme.buttonText : Theme.surfaceText
cornerRadius: resultDelegate.radius
animationDuration: Anims.settingsNavigationRippleDuration
}
Row {
@@ -837,8 +840,9 @@ Rectangle {
Behavior on color {
ColorAnimation {
duration: Theme.shortDuration
easing.type: Theme.standardEasing
duration: root.navigationStateDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: Anims.expressiveEffects
}
}
}
@@ -912,6 +916,7 @@ Rectangle {
id: categoryRipple
rippleColor: categoryRow.isActive ? Theme.buttonText : Theme.surfaceText
cornerRadius: categoryRow.radius
animationDuration: Anims.settingsNavigationRippleDuration
}
Row {
@@ -967,8 +972,9 @@ Rectangle {
Behavior on color {
ColorAnimation {
duration: Theme.shortDuration
easing.type: Theme.standardEasing
duration: root.navigationStateDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: Anims.expressiveEffects
}
}
}
@@ -1009,6 +1015,7 @@ Rectangle {
id: childRipple
rippleColor: childDelegate.isActive ? Theme.buttonText : Theme.surfaceText
cornerRadius: childDelegate.radius
animationDuration: Anims.settingsNavigationRippleDuration
}
Row {
@@ -1049,8 +1056,9 @@ Rectangle {
Behavior on color {
ColorAnimation {
duration: Theme.shortDuration
easing.type: Theme.standardEasing
duration: root.navigationStateDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: Anims.expressiveEffects
}
}
}