1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 22:42:50 -05:00

Configurable widget displays

This commit is contained in:
bbedward
2025-07-13 11:48:25 -04:00
parent 755f13e06b
commit 19be4c6bbb
3 changed files with 119 additions and 2 deletions

View File

@@ -328,6 +328,59 @@ PanelWindow {
}
}
// Widget Visibility Settings
SettingsSection {
title: "Top Bar Widgets"
iconName: "widgets"
content: Column {
width: parent.width
spacing: Theme.spacingM
SettingsToggle {
text: "Focused Window"
description: "Show the currently focused application in the top bar"
checked: Prefs.showFocusedWindow
onToggled: (checked) => Prefs.setShowFocusedWindow(checked)
}
SettingsToggle {
text: "Weather Widget"
description: "Display weather information in the top bar"
checked: Prefs.showWeather
onToggled: (checked) => Prefs.setShowWeather(checked)
}
SettingsToggle {
text: "Media Controls"
description: "Show currently playing media in the top bar"
checked: Prefs.showMusic
onToggled: (checked) => Prefs.setShowMusic(checked)
}
SettingsToggle {
text: "Clipboard Button"
description: "Show clipboard access button in the top bar"
checked: Prefs.showClipboard
onToggled: (checked) => Prefs.setShowClipboard(checked)
}
SettingsToggle {
text: "System Resources"
description: "Display CPU and RAM usage indicators"
checked: Prefs.showSystemResources
onToggled: (checked) => Prefs.setShowSystemResources(checked)
}
SettingsToggle {
text: "System Tray"
description: "Show system tray icons in the top bar"
checked: Prefs.showSystemTray
onToggled: (checked) => Prefs.setShowSystemTray(checked)
}
}
}
// Display Settings
SettingsSection {
title: "Display & Appearance"

View File

@@ -159,6 +159,7 @@ PanelWindow {
FocusedAppWidget {
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showFocusedWindow
}
}
@@ -179,6 +180,7 @@ PanelWindow {
anchors.rightMargin: Theme.spacingS
activePlayer: topBar.activePlayer
hasActiveMedia: topBar.hasActiveMedia
visible: Prefs.showMusic && topBar.hasActiveMedia
onClicked: {
if (topBar.shellRoot) {
@@ -201,6 +203,7 @@ PanelWindow {
weatherCode: topBar.weatherCode
weatherTemp: topBar.weatherTemp
weatherTempF: topBar.weatherTempF
visible: Prefs.showWeather
onClicked: {
if (topBar.shellRoot) {
@@ -222,6 +225,7 @@ PanelWindow {
SystemTrayWidget {
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showSystemTray
onMenuRequested: (menu, item, x, y) => {
topBar.currentTrayMenu = menu
topBar.currentTrayItem = item
@@ -239,6 +243,7 @@ PanelWindow {
radius: Theme.cornerRadius
color: clipboardArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.08)
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showClipboard
Text {
anchors.centerIn: parent
@@ -275,10 +280,12 @@ PanelWindow {
// System Monitor Widgets
CpuMonitorWidget {
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showSystemResources
}
RamMonitorWidget {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showSystemResources
}
NotificationCenterButton {