fix: make nexus handle transparency properly
This commit is contained in:
parent
26b50cec04
commit
ab3f3e2376
5 changed files with 32 additions and 26 deletions
|
|
@ -16,26 +16,28 @@ Item {
|
||||||
|
|
||||||
onClose: root.close()
|
onClose: root.close()
|
||||||
}
|
}
|
||||||
|
property color blobColour: Colours.tPalette.m3surfaceContainerLow
|
||||||
|
|
||||||
signal close
|
signal close
|
||||||
|
|
||||||
implicitWidth: implicitHeight * Tokens.sizes.nexus.ratio
|
implicitWidth: implicitHeight * Tokens.sizes.nexus.ratio
|
||||||
implicitHeight: nState.screen.height * Tokens.sizes.nexus.heightMult
|
implicitHeight: nState.screen.height * Tokens.sizes.nexus.heightMult
|
||||||
|
|
||||||
|
Behavior on blobColour {
|
||||||
|
CAnim {}
|
||||||
|
}
|
||||||
|
|
||||||
BlobGroup {
|
BlobGroup {
|
||||||
id: blobGroup
|
id: blobGroup
|
||||||
|
|
||||||
smoothing: root.Tokens.rounding.medium
|
smoothing: root.Tokens.rounding.medium
|
||||||
color: Colours.palette.m3surfaceContainerLow
|
color: root.blobColour
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
CAnim {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlobInvertedRect {
|
BlobInvertedRect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
group: blobGroup
|
group: blobGroup
|
||||||
|
opacity: root.blobColour.a
|
||||||
radius: Tokens.rounding.large
|
radius: Tokens.rounding.large
|
||||||
|
|
||||||
borderLeft: navPane.width + navPane.anchors.margins * 2
|
borderLeft: navPane.width + navPane.anchors.margins * 2
|
||||||
|
|
@ -45,36 +47,39 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
BlobRect {
|
BlobRect {
|
||||||
|
id: windowBtnRect
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
||||||
group: blobGroup
|
group: blobGroup
|
||||||
|
opacity: root.blobColour.a
|
||||||
radius: Tokens.rounding.medium
|
radius: Tokens.rounding.medium
|
||||||
|
|
||||||
implicitWidth: windowBtn.implicitWidth + Tokens.padding.extraSmall * 2
|
implicitWidth: windowBtn.implicitWidth + Tokens.padding.extraSmall * 2
|
||||||
implicitHeight: windowBtn.implicitHeight + Tokens.padding.extraSmall
|
implicitHeight: windowBtn.implicitHeight + Tokens.padding.extraSmall
|
||||||
|
}
|
||||||
|
|
||||||
IconButton {
|
IconButton {
|
||||||
id: windowBtn
|
id: windowBtn
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: windowBtnRect
|
||||||
icon: nState.isWindow ? "close" : "pip"
|
icon: nState.isWindow ? "close" : "pip"
|
||||||
type: IconButton.Text
|
type: IconButton.Text
|
||||||
label.fill: 0
|
label.fill: 0
|
||||||
inactiveOnColour: hovered ? nState.isWindow ? Colours.palette.m3error : Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
inactiveOnColour: hovered ? nState.isWindow ? Colours.palette.m3error : Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||||
stateLayer.opacity: 0
|
stateLayer.opacity: 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!nState.isWindow)
|
if (!nState.isWindow)
|
||||||
WindowFactory.create();
|
WindowFactory.create();
|
||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
label.scale: pressed ? 0.8 : 1
|
label.scale: pressed ? 0.8 : 1
|
||||||
label.renderType: Text.QtRendering
|
label.renderType: Text.QtRendering
|
||||||
|
|
||||||
Behavior on label.scale {
|
Behavior on label.scale {
|
||||||
Anim {}
|
Anim {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ Singleton {
|
||||||
id: win
|
id: win
|
||||||
|
|
||||||
color: Colours.tPalette.m3surface
|
color: Colours.tPalette.m3surface
|
||||||
|
surfaceFormat.opaque: false
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible)
|
if (!visible)
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ StyledFlickable {
|
||||||
return h % 2 === 0 ? h : h + 1;
|
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
|
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
|
topRightRadius: stateLayer.pressed ? Tokens.rounding.medium : isCurrentPage ? Tokens.rounding.extraLargeIncreased : isCategoryStart ? Tokens.rounding.extraLarge : Tokens.rounding.extraSmall
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ StyledRect {
|
||||||
implicitHeight: searchLayout.implicitHeight + Tokens.padding.medium * 2
|
implicitHeight: searchLayout.implicitHeight + Tokens.padding.medium * 2
|
||||||
|
|
||||||
radius: Tokens.rounding.full
|
radius: Tokens.rounding.full
|
||||||
color: Colours.palette.m3surfaceContainerLowest
|
color: Colours.tPalette.m3surfaceContainerLowest
|
||||||
border.color: Colours.palette.m3outlineVariant
|
border.color: Colours.palette.m3outlineVariant
|
||||||
|
|
||||||
Behavior on border.color {
|
Behavior on border.color {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ ColumnLayout {
|
||||||
return Math.min(Math.round(cWidth * 0.4), cWidth / screen.width * screen.height);
|
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
|
radius: Tokens.rounding.large
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue