From 292b6daf5c56ff60a6263ff4945e74e5ca4372e7 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 13 Jul 2026 15:58:40 -0400 Subject: Creating an overview version that works with all branches Signed-off-by: Don Williams On branch development Your branch is up to date with 'origin/development'. Changes to be committed: new file: config/quickshell/overview-unified/README.md new file: config/quickshell/overview-unified/assets/image.png new file: config/quickshell/overview-unified/common/Appearance.qml new file: config/quickshell/overview-unified/common/Config.qml new file: config/quickshell/overview-unified/common/functions/ColorUtils.qml new file: config/quickshell/overview-unified/common/functions/qmldir new file: config/quickshell/overview-unified/common/qmldir new file: config/quickshell/overview-unified/common/widgets/RectangularShadow.qml new file: config/quickshell/overview-unified/common/widgets/StyledRectangularShadow.qml new file: config/quickshell/overview-unified/common/widgets/StyledText.qml new file: config/quickshell/overview-unified/common/widgets/StyledToolTip.qml new file: config/quickshell/overview-unified/common/widgets/StyledToolTipContent.qml new file: config/quickshell/overview-unified/common/widgets/qmldir new file: config/quickshell/overview-unified/modules/overview/Overview.qml new file: config/quickshell/overview-unified/modules/overview/OverviewWidget.qml new file: config/quickshell/overview-unified/modules/overview/OverviewWindow.qml new file: config/quickshell/overview-unified/modules/overview/qmldir new file: config/quickshell/overview-unified/services/GlobalStates.qml new file: config/quickshell/overview-unified/services/HyprlandData.qml new file: config/quickshell/overview-unified/services/qmldir new file: config/quickshell/overview-unified/shell.qml new file: config/quickshell/qs-hyprview-trixie/LICENSE new file: config/quickshell/qs-hyprview-trixie/README.md new file: config/quickshell/qs-hyprview-trixie/common/Appearance.qml new file: config/quickshell/qs-hyprview-trixie/layouts/BandsLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/HeroLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/JustifiedLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/LayoutsManager.qml new file: config/quickshell/qs-hyprview-trixie/layouts/MasonryLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SatelliteLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SmartGridLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/SpiralLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/StarggeredLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/VortexLayout.qml new file: config/quickshell/qs-hyprview-trixie/layouts/qmldir new file: config/quickshell/qs-hyprview-trixie/modules/Hyprview.qml new file: config/quickshell/qs-hyprview-trixie/modules/SearchBox.qml new file: config/quickshell/qs-hyprview-trixie/modules/WindowThumbnail.qml new file: config/quickshell/qs-hyprview-trixie/modules/qmldir new file: config/quickshell/qs-hyprview-trixie/qs-hyprview-template.qml new file: config/quickshell/qs-hyprview-trixie/screenshots/bands.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/hero.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/masonry.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/satellite.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/smartgrid.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/spiral.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/staggered.jpeg new file: config/quickshell/qs-hyprview-trixie/screenshots/vortex.jpeg new file: config/quickshell/qs-hyprview-trixie/shell.qml --- .../qs-hyprview-trixie/layouts/ColumnarLayout.qml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml (limited to 'config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml') diff --git a/config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml b/config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml new file mode 100644 index 00000000..feaa9afa --- /dev/null +++ b/config/quickshell/qs-hyprview-trixie/layouts/ColumnarLayout.qml @@ -0,0 +1,72 @@ +pragma Singleton +import Quickshell + +Singleton { + id: root + + function doLayout(windowList, outerWidth, outerHeight) { + var N = windowList.length + if (N === 0) return [] + + var gap = Math.max(8, outerWidth * 0.005) + + // Safe Area: We use slightly more width here (95%) + // as vertical strips look better when filling the screen horizontally. + var useW = outerWidth * 0.95 + var useH = outerHeight * 0.90 + var offX = (outerWidth - useW) / 2 + var offY = (outerHeight - useH) / 2 + + // Calculate width of a single column + var colW = (useW - (gap * (N - 1))) / N + + // Safety: If columns become too narrow (e.g. < 200px), + // we clamp the width to keep them readable. + var minColW = 200 + if (colW < minColW) colW = minColW + + // Calculate the actual total width used + var totalW = N * colW + (N - 1) * gap + + // Center the group horizontally. + // If N is small, it centers. If N is large (clamped), it starts from left. + var startX = offX + if (totalW < useW) { + startX = offX + (useW - totalW) / 2 + } + + var result = [] + + for (var i = 0; i < N; i++) { + var item = windowList[i] + + var w0 = (item.width > 0) ? item.width : 100 + var h0 = (item.height > 0) ? item.height : 100 + + // In this layout, vertical space is abundant (useH). + // The constraining factor is usually the column width. + var sc = Math.min(colW / w0, useH / h0) + + var thumbW = w0 * sc + var thumbH = h0 * sc + + var xPos = startX + i * (colW + gap) + + // Center horizontally within the strip + var xCentered = xPos + (colW - thumbW) / 2 + + // Center vertically on screen + var yCentered = offY + (useH - thumbH) / 2 + + result.push({ + win: item.win, + x: xCentered, + y: yCentered, + width: thumbW, + height: thumbH + }) + } + + return result + } +} -- cgit v1.2.3