From ab3f3e2376c667c3e846c8383cf32df875f3fd67 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 5 Jun 2026 01:29:06 +1000 Subject: [PATCH] fix: make nexus handle transparency properly --- modules/nexus/Nexus.qml | 51 +++++++++++++---------- modules/nexus/WindowFactory.qml | 1 + modules/nexus/navpane/NavLocations.qml | 2 +- modules/nexus/navpane/SearchBar.qml | 2 +- modules/nexus/pages/WallpaperAndStyle.qml | 2 +- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/modules/nexus/Nexus.qml b/modules/nexus/Nexus.qml index b22d00c3..602f62b0 100644 --- a/modules/nexus/Nexus.qml +++ b/modules/nexus/Nexus.qml @@ -16,26 +16,28 @@ Item { onClose: root.close() } + property color blobColour: Colours.tPalette.m3surfaceContainerLow signal close implicitWidth: implicitHeight * Tokens.sizes.nexus.ratio implicitHeight: nState.screen.height * Tokens.sizes.nexus.heightMult + Behavior on blobColour { + CAnim {} + } + BlobGroup { id: blobGroup smoothing: root.Tokens.rounding.medium - color: Colours.palette.m3surfaceContainerLow - - Behavior on color { - CAnim {} - } + color: root.blobColour } BlobInvertedRect { anchors.fill: parent group: blobGroup + opacity: root.blobColour.a radius: Tokens.rounding.large borderLeft: navPane.width + navPane.anchors.margins * 2 @@ -45,36 +47,39 @@ Item { } BlobRect { + id: windowBtnRect + anchors.right: parent.right anchors.top: parent.top group: blobGroup + opacity: root.blobColour.a radius: Tokens.rounding.medium implicitWidth: windowBtn.implicitWidth + Tokens.padding.extraSmall * 2 implicitHeight: windowBtn.implicitHeight + Tokens.padding.extraSmall + } - IconButton { - id: windowBtn + IconButton { + id: windowBtn - anchors.centerIn: parent - icon: nState.isWindow ? "close" : "pip" - type: IconButton.Text - label.fill: 0 - inactiveOnColour: hovered ? nState.isWindow ? Colours.palette.m3error : Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant - stateLayer.opacity: 0 - onClicked: { - if (!nState.isWindow) - WindowFactory.create(); - root.close(); - } + anchors.centerIn: windowBtnRect + icon: nState.isWindow ? "close" : "pip" + type: IconButton.Text + label.fill: 0 + inactiveOnColour: hovered ? nState.isWindow ? Colours.palette.m3error : Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant + stateLayer.opacity: 0 + onClicked: { + if (!nState.isWindow) + WindowFactory.create(); + root.close(); + } - label.scale: pressed ? 0.8 : 1 - label.renderType: Text.QtRendering + label.scale: pressed ? 0.8 : 1 + label.renderType: Text.QtRendering - Behavior on label.scale { - Anim {} - } + Behavior on label.scale { + Anim {} } } diff --git a/modules/nexus/WindowFactory.qml b/modules/nexus/WindowFactory.qml index af57d6f0..ab26d15f 100644 --- a/modules/nexus/WindowFactory.qml +++ b/modules/nexus/WindowFactory.qml @@ -25,6 +25,7 @@ Singleton { id: win color: Colours.tPalette.m3surface + surfaceFormat.opaque: false onVisibleChanged: { if (!visible) diff --git a/modules/nexus/navpane/NavLocations.qml b/modules/nexus/navpane/NavLocations.qml index da61f77e..9ef8a330 100644 --- a/modules/nexus/navpane/NavLocations.qml +++ b/modules/nexus/navpane/NavLocations.qml @@ -107,7 +107,7 @@ StyledFlickable { return h % 2 === 0 ? h : h + 1; } - color: isCurrentPage ? Colours.palette.m3secondaryContainer : Colours.palette.m3surfaceContainerHigh + color: isCurrentPage ? Colours.palette.m3secondaryContainer : Colours.layer(Colours.palette.m3surfaceContainerHigh, 2) topLeftRadius: stateLayer.pressed ? Tokens.rounding.medium : isCurrentPage ? Tokens.rounding.extraLargeIncreased : isCategoryStart ? Tokens.rounding.extraLarge : Tokens.rounding.extraSmall topRightRadius: stateLayer.pressed ? Tokens.rounding.medium : isCurrentPage ? Tokens.rounding.extraLargeIncreased : isCategoryStart ? Tokens.rounding.extraLarge : Tokens.rounding.extraSmall diff --git a/modules/nexus/navpane/SearchBar.qml b/modules/nexus/navpane/SearchBar.qml index 95236768..6f35061d 100644 --- a/modules/nexus/navpane/SearchBar.qml +++ b/modules/nexus/navpane/SearchBar.qml @@ -14,7 +14,7 @@ StyledRect { implicitHeight: searchLayout.implicitHeight + Tokens.padding.medium * 2 radius: Tokens.rounding.full - color: Colours.palette.m3surfaceContainerLowest + color: Colours.tPalette.m3surfaceContainerLowest border.color: Colours.palette.m3outlineVariant Behavior on border.color { diff --git a/modules/nexus/pages/WallpaperAndStyle.qml b/modules/nexus/pages/WallpaperAndStyle.qml index 7011963a..29ec95ff 100644 --- a/modules/nexus/pages/WallpaperAndStyle.qml +++ b/modules/nexus/pages/WallpaperAndStyle.qml @@ -40,7 +40,7 @@ ColumnLayout { return Math.min(Math.round(cWidth * 0.4), cWidth / screen.width * screen.height); } - color: Colours.palette.m3surfaceContainer + color: Colours.tPalette.m3surfaceContainer radius: Tokens.rounding.large Loader {