diff options
| author | Nippy <nippy@rp1.hu> | 2026-07-28 15:11:02 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-07-28 15:11:02 +0200 |
| commit | 077a92c901cb4f31bdb47a1a19a73636be0b4a48 (patch) | |
| tree | d86acead5a642dd4d2dde332c0733012b37079c4 /raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml | |
| parent | 0bd16bd038538d879cbf21f3ef0731f06c3bfb24 (diff) | |
| download | RaveOS-PKGBUILD-077a92c901cb4f31bdb47a1a19a73636be0b4a48.tar.gz RaveOS-PKGBUILD-077a92c901cb4f31bdb47a1a19a73636be0b4a48.zip | |
new settings
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml b/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml deleted file mode 100644 index f810cb6..0000000 --- a/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/DWLLayout.qml +++ /dev/null @@ -1,110 +0,0 @@ -import QtQuick -import Quickshell -import qs.Common -import qs.Modules.Plugins -import qs.Services -import qs.Widgets - -BasePill { - id: layout - - property bool layoutPopupVisible: false - property var popoutTarget: null - - signal toggleLayoutPopup() - - visible: CompositorService.isDwl && DwlService.dwlAvailable - - property var outputState: parentScreen ? DwlService.getOutputState(parentScreen.name) : null - property string currentLayoutSymbol: outputState?.layoutSymbol || "" - property int currentLayoutIndex: outputState?.layout || 0 - - readonly property var layoutIcons: ({ - "CT": "view_compact", - "G": "grid_view", - "K": "layers", - "M": "fullscreen", - "RT": "view_sidebar", - "S": "view_carousel", - "T": "view_quilt", - "VG": "grid_on", - "VK": "view_day", - "VS": "scrollable_header", - "VT": "clarify" - }) - - function getLayoutIcon(symbol) { - return layoutIcons[symbol] || "view_quilt" - } - - Connections { - target: DwlService - function onStateChanged() { - outputState = parentScreen ? DwlService.getOutputState(parentScreen.name) : null - } - } - - content: Component { - Item { - implicitWidth: layout.isVerticalOrientation ? (layout.widgetThickness - layout.horizontalPadding * 2) : layoutContent.implicitWidth - implicitHeight: layout.isVerticalOrientation ? layoutColumn.implicitHeight : (layout.widgetThickness - layout.horizontalPadding * 2) - - Column { - id: layoutColumn - visible: layout.isVerticalOrientation - anchors.centerIn: parent - spacing: 1 - - DankIcon { - name: layout.getLayoutIcon(layout.currentLayoutSymbol) - size: Theme.barIconSize(layout.barThickness, undefined, layout.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) - color: Theme.widgetTextColor - anchors.horizontalCenter: parent.horizontalCenter - } - - StyledText { - text: layout.currentLayoutSymbol - font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale, layout.barConfig?.maximizeWidgetText) - color: Theme.widgetTextColor - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Row { - id: layoutContent - visible: !layout.isVerticalOrientation - anchors.centerIn: parent - spacing: (barConfig?.noBackground ?? false) ? 1 : 2 - - DankIcon { - name: layout.getLayoutIcon(layout.currentLayoutSymbol) - size: Theme.barIconSize(layout.barThickness, -4, layout.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) - color: Theme.widgetTextColor - anchors.verticalCenter: parent.verticalCenter - } - - StyledText { - text: layout.currentLayoutSymbol - font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale, layout.barConfig?.maximizeWidgetText) - color: Theme.widgetTextColor - anchors.verticalCenter: parent.verticalCenter - } - } - } - } - - onClicked: { - toggleLayoutPopup() - } - - onRightClicked: { - if (!parentScreen || !DwlService.dwlAvailable || DwlService.layouts.length === 0) { - return - } - - const currentIndex = layout.currentLayoutIndex - const nextIndex = (currentIndex + 1) % DwlService.layouts.length - - DwlService.setLayout(parentScreen.name, nextIndex) - } -} |