settings: reorganize and add settings

This commit is contained in:
end-4
2025-06-21 11:59:40 +02:00
parent 5ffbd55f58
commit 7e46e40eeb
12 changed files with 489 additions and 317 deletions
+32 -7
View File
@@ -30,12 +30,12 @@ ApplicationWindow {
{
name: "Style",
icon: "palette",
component: "modules/settings/Style.qml"
component: "modules/settings/StyleConfig.qml"
},
{
name: "Behavior",
name: "General",
icon: "settings",
component: "modules/settings/BehaviorConfig.qml"
component: "modules/settings/GeneralConfig.qml"
},
{
name: "About",
@@ -66,6 +66,28 @@ ApplicationWindow {
margins: contentPadding
}
Keys.onPressed: (event) => {
console.log(`Key pressed: ${event.key}, Modifiers: ${event.modifiers}`);
if (event.modifiers === Qt.ControlModifier) {
if (event.key === Qt.Key_PageDown) {
root.currentPage = Math.min(root.currentPage + 1, root.pages.length - 1)
event.accepted = true;
}
else if (event.key === Qt.Key_PageUp) {
root.currentPage = Math.max(root.currentPage - 1, 0)
event.accepted = true;
}
else if (event.key === Qt.Key_Tab) {
root.currentPage = (root.currentPage + 1) % root.pages.length;
event.accepted = true;
}
else if (event.key === Qt.Key_Backtab) {
root.currentPage = (root.currentPage - 1 + root.pages.length) % root.pages.length;
event.accepted = true;
}
}
}
Item { // Titlebar
visible: ConfigOptions?.windows.showTitlebar
Layout.fillWidth: true
@@ -125,7 +147,9 @@ ApplicationWindow {
spacing: 10
expanded: root.width > 900
NavigationRailExpandButton {}
NavigationRailExpandButton {
focus: root.visible
}
FloatingActionButton {
id: fab
@@ -180,7 +204,8 @@ ApplicationWindow {
target: root
function onCurrentPageChanged() {
if (pageLoader.sourceComponent !== root.pages[root.currentPage].component) {
switchAnim.restart();
switchAnim.complete();
switchAnim.start();
}
}
}
@@ -193,7 +218,7 @@ ApplicationWindow {
properties: "opacity"
from: 1
to: 0
duration: 150
duration: 0
easing.type: Appearance.animation.elementMoveExit.type
easing.bezierCurve: Appearance.animationCurves.emphasizedFirstHalf
}
@@ -207,7 +232,7 @@ ApplicationWindow {
properties: "opacity"
from: 0
to: 1
duration: 250
duration: 0
easing.type: Appearance.animation.elementMoveEnter.type
easing.bezierCurve: Appearance.animationCurves.emphasizedLastHalf
}