fix: make nexus handle transparency properly

This commit is contained in:
2 * r + 2 * t 2026-06-05 01:29:06 +10:00
parent 26b50cec04
commit ab3f3e2376
5 changed files with 32 additions and 26 deletions

View file

@ -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 {}
}
}

View file

@ -25,6 +25,7 @@ Singleton {
id: win
color: Colours.tPalette.m3surface
surfaceFormat.opaque: false
onVisibleChanged: {
if (!visible)

View file

@ -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

View file

@ -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 {

View file

@ -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 {