diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-07-13 15:58:40 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-08-29 21:40:34 -0700 |
| commit | 292b6daf5c56ff60a6263ff4945e74e5ca4372e7 (patch) | |
| tree | 0c01784cf05adc8deec5a8a50fa71e1db294c96e /config/quickshell/overview-unified/modules/overview/OverviewWindow.qml | |
| parent | 54b56290253719aa71d8ccfddff6fa0424e22804 (diff) | |
Creating an overview version that works with all branches
Signed-off-by: Don Williams <don.e.williams@gmail.com>
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
Diffstat (limited to 'config/quickshell/overview-unified/modules/overview/OverviewWindow.qml')
| -rw-r--r-- | config/quickshell/overview-unified/modules/overview/OverviewWindow.qml | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/config/quickshell/overview-unified/modules/overview/OverviewWindow.qml b/config/quickshell/overview-unified/modules/overview/OverviewWindow.qml new file mode 100644 index 00000000..fac3e22e --- /dev/null +++ b/config/quickshell/overview-unified/modules/overview/OverviewWindow.qml @@ -0,0 +1,112 @@ +import QtQuick.Effects +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Wayland +import "../../common" +import "../../common/functions" +import "../../services" + +Item { // Window + id: root + property var toplevel + property var windowData + property var monitorData + property var scale + property var availableWorkspaceWidth + property var availableWorkspaceHeight + property bool restrictToWorkspace: true + property real initX: Math.max(((windowData?.at[0] ?? 0) - (monitorData?.x ?? 0) - (monitorData?.reserved?.[0] ?? 0)) * root.scale, 0) + xOffset + property real initY: Math.max(((windowData?.at[1] ?? 0) - (monitorData?.y ?? 0) - (monitorData?.reserved?.[1] ?? 0)) * root.scale, 0) + yOffset + property real xOffset: 0 + property real yOffset: 0 + property int widgetMonitorId: 0 + + property var targetWindowWidth: (windowData?.size[0] ?? 100) * scale + property var targetWindowHeight: (windowData?.size[1] ?? 100) * scale + property bool hovered: false + property bool pressed: false + + property var iconToWindowRatio: 0.25 + property var xwaylandIndicatorToIconRatio: 0.35 + property var iconToWindowRatioCompact: 0.45 + property var entry: DesktopEntries.heuristicLookup(windowData?.class) + property var iconPath: Quickshell.iconPath(entry?.icon ?? windowData?.class ?? "application-x-executable", "image-missing") + property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth + + property bool indicateXWayland: windowData?.xwayland ?? false + + x: initX + y: initY + width: Math.min((windowData?.size[0] ?? 100) * root.scale, availableWorkspaceWidth) + height: Math.min((windowData?.size[1] ?? 100) * root.scale, availableWorkspaceHeight) + opacity: (windowData?.monitor ?? -1) == widgetMonitorId ? 1 : 0.4 + + layer.enabled: true + layer.smooth: true + layer.mipmap: true + + Behavior on x { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on y { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on width { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on height { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + + Rectangle { + id: clipContainer + anchors.fill: parent + radius: Appearance.rounding.windowRounding * root.scale + clip: true + color: "transparent" + + ScreencopyView { + id: windowPreview + anchors.fill: parent + captureSource: GlobalStates.overviewOpen ? root.toplevel : null + live: true + + Rectangle { + anchors.fill: parent + radius: Appearance.rounding.windowRounding * root.scale + color: pressed ? ColorUtils.transparentize(Appearance.colors.colLayer2Active, 0.5) : + hovered ? ColorUtils.transparentize(Appearance.colors.colLayer2Hover, 0.7) : + ColorUtils.transparentize(Appearance.colors.colLayer2) + border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.7) + border.width : 1 + } + + ColumnLayout { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + spacing: Appearance.font.pixelSize.smaller * 0.5 + + Image { + id: windowIcon + property var iconSize: { + return Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / (root.monitorData?.scale ?? 1); + } + Layout.alignment: Qt.AlignHCenter + source: root.iconPath + width: iconSize + height: iconSize + sourceSize: Qt.size(iconSize, iconSize) + + Behavior on width { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on height { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + } + } + } + } +} |
