1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 12:13:31 -04:00
Files
DankMaterialShell/quickshell/Modules/ControlCenter/Components/DiskUsageWidgetConfigMenu.qml
T
Guilherme Pagano 3e4d2b4d46 feat(control-center): add DiskUsage widget config overlay with showMountPath toggle and standardized tile sizing (#2507)
* feat(control-center): add widget config overlay with showMountPath toggle for DiskUsage

Introduces WidgetConfigOverlay and DiskUsageWidgetConfigMenu components, allowing
users to toggle mount path visibility per DiskUsage widget in edit mode

* refactor(control-center): use Theme.iconSizeLarge and Theme.fontSizeLarge for small tiles

Standardize SmallDiskUsageButton and SmallBatteryButton sizing with Theme.iconSizeLarge
and Theme.fontSizeLarge, and unify font weight to Font.Bold on both tile widgets.

* fix(control-center): adjust SmallDiskUsageButton font size based on showMountPath

* refactor(control-center): simplify DiskUsage config menu i18n strings

Remove the redundant "Disk Usage Widget" title and the toggle description
to reduce translatable strings
2026-06-01 11:35:14 -04:00

39 lines
945 B
QML

import QtQuick
import qs.Common
import qs.Widgets
Rectangle {
id: root
property var widgetData: null
signal showMountPathChanged(bool show)
width: 260
height: menuColumn.implicitHeight + Theme.spacingS * 2
radius: Theme.cornerRadius
color: Theme.surfaceContainer
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.16)
border.width: 1
MouseArea {
anchors.fill: parent
}
Column {
id: menuColumn
anchors.fill: parent
anchors.margins: Theme.spacingS
spacing: 2
DankToggle {
width: parent.width
text: I18n.tr("Show mount path", "toggle in control center disk usage widget to turn mount path display on or off")
checked: root.widgetData?.showMountPath !== false
onToggled: newChecked => {
root.showMountPathChanged(newChecked);
}
}
}
}