summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js
diff options
context:
space:
mode:
authorNippy <nippy@rp1.hu>2026-05-09 13:33:09 +0200
committerNippy <nippy@rp1.hu>2026-05-09 13:33:09 +0200
commita2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5 (patch)
tree1a8769217f84bfe9d6216fafaadaf8cdd876d457 /raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js
parent34b9c34f982b2596cfa9e368a2d7f74e9a17477c (diff)
downloadRaveOS-PKGBUILD-a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5.tar.gz
RaveOS-PKGBUILD-a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5.zip
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js')
-rw-r--r--raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js
deleted file mode 100644
index b8e5651..0000000
--- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/layout.js
+++ /dev/null
@@ -1,45 +0,0 @@
-function calculateRowsAndWidgets(controlCenterColumn, expandedSection, expandedWidgetIndex) {
- var rows = []
- var currentRow = []
- var currentWidth = 0
- var expandedRow = -1
-
- const widgets = SettingsData.controlCenterWidgets || []
- const baseWidth = controlCenterColumn.width
- const spacing = Theme.spacingS
-
- for (var i = 0; i < widgets.length; i++) {
- const widget = widgets[i]
- const widgetWidth = widget.width || 50
-
- var itemWidth
- if (widgetWidth <= 25) {
- itemWidth = (baseWidth - spacing * 3) / 4
- } else if (widgetWidth <= 50) {
- itemWidth = (baseWidth - spacing) / 2
- } else if (widgetWidth <= 75) {
- itemWidth = (baseWidth - spacing * 2) * 0.75
- } else {
- itemWidth = baseWidth
- }
-
- if (currentRow.length > 0 && (currentWidth + spacing + itemWidth > baseWidth)) {
- rows.push([...currentRow])
- currentRow = [widget]
- currentWidth = itemWidth
- } else {
- currentRow.push(widget)
- currentWidth += (currentRow.length > 1 ? spacing : 0) + itemWidth
- }
-
- if (expandedWidgetIndex === i) {
- expandedRow = rows.length
- }
- }
-
- if (currentRow.length > 0) {
- rows.push(currentRow)
- }
-
- return { rows: rows, expandedRowIndex: expandedRow }
-}