mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
147 lines
4.1 KiB
QML
147 lines
4.1 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import qs.Common
|
|
import qs.Widgets
|
|
|
|
DankModal {
|
|
id: settingsPopup
|
|
|
|
property bool settingsVisible: false
|
|
|
|
signal closingPopup()
|
|
|
|
onVisibleChanged: {
|
|
if (!visible) {
|
|
closingPopup();
|
|
if (typeof globalDropdownWindow !== 'undefined') {
|
|
globalDropdownWindow.hide();
|
|
}
|
|
}
|
|
}
|
|
|
|
// DankModal configuration
|
|
visible: settingsVisible
|
|
width: 700
|
|
height: 600
|
|
keyboardFocus: "ondemand"
|
|
enableShadow: true
|
|
|
|
onBackgroundClicked: {
|
|
settingsVisible = false;
|
|
}
|
|
|
|
content: Component {
|
|
Column {
|
|
anchors.fill: parent
|
|
anchors.margins: Theme.spacingL
|
|
spacing: Theme.spacingL
|
|
|
|
// Header
|
|
Row {
|
|
width: parent.width
|
|
spacing: Theme.spacingM
|
|
|
|
DankIcon {
|
|
name: "settings"
|
|
size: Theme.iconSize
|
|
color: Theme.primary
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Text {
|
|
text: "Settings"
|
|
font.pixelSize: Theme.fontSizeXLarge
|
|
color: Theme.surfaceText
|
|
font.weight: Font.Medium
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Item {
|
|
width: parent.width - 175 // Spacer to push close button to the right
|
|
height: 1
|
|
}
|
|
|
|
// Close button
|
|
DankActionButton {
|
|
circular: false
|
|
iconName: "close"
|
|
iconSize: Theme.iconSize - 4
|
|
iconColor: Theme.surfaceText
|
|
hoverColor: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12)
|
|
onClicked: settingsPopup.settingsVisible = false
|
|
}
|
|
|
|
}
|
|
|
|
// Settings sections
|
|
ScrollView {
|
|
id: settingsScrollView
|
|
width: parent.width
|
|
height: parent.height - 50
|
|
clip: true
|
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
Column {
|
|
id: settingsColumn
|
|
width: settingsScrollView.width - 20
|
|
spacing: Theme.spacingL
|
|
bottomPadding: Theme.spacingL
|
|
|
|
// Profile Settings
|
|
SettingsSection {
|
|
title: "Profile"
|
|
iconName: "person"
|
|
content: ProfileTab {}
|
|
}
|
|
|
|
// Clock Settings
|
|
SettingsSection {
|
|
title: "Clock & Time"
|
|
iconName: "schedule"
|
|
content: ClockTab {}
|
|
}
|
|
|
|
// Weather Settings
|
|
SettingsSection {
|
|
title: "Weather"
|
|
iconName: "wb_sunny"
|
|
content: WeatherTab {}
|
|
}
|
|
|
|
// Widget Visibility Settings
|
|
SettingsSection {
|
|
title: "Top Bar Widgets"
|
|
iconName: "widgets"
|
|
content: WidgetsTab {}
|
|
}
|
|
|
|
// Workspace Settings
|
|
SettingsSection {
|
|
title: "Workspaces"
|
|
iconName: "tab"
|
|
content: WorkspaceTab {}
|
|
}
|
|
|
|
// Display Settings
|
|
SettingsSection {
|
|
title: "Display & Appearance"
|
|
iconName: "palette"
|
|
content: DisplayTab {}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
// Keyboard focus and shortcuts
|
|
FocusScope {
|
|
anchors.fill: parent
|
|
focus: settingsPopup.settingsVisible
|
|
Keys.onEscapePressed: settingsPopup.settingsVisible = false
|
|
}
|
|
|
|
} |