fix: reduce shader usage

This commit is contained in:
2026-10-23 00:05:08 +02:00
parent 6781078467
commit 36cddc96c3
32 changed files with 959 additions and 84 deletions
@@ -6,7 +6,7 @@ import qs.Effects
import qs.Components
import qs.Services
CustomClippingRect {
CustomRect {
id: root
property bool expanded: false
@@ -185,7 +185,7 @@ Item {
}
}
CustomClippingRect {
CustomRect {
id: fabMenuItem
required property var modelData
@@ -197,6 +197,7 @@ Item {
radius: sLayer.pressed ? Tokens.rounding.small : implicitHeight / 2
color: Colors.palette.m3primaryContainer
visible: !(modelData.name === "pop out in window" && ChatState.isWindow)
clip: true
Behavior on radius {
Anim {
@@ -24,7 +24,7 @@ Item {
implicitHeight: bubble.implicitHeight + (actionsRow.shouldBeActive ? actionsRow.implicitHeight + actionsRow.anchors.topMargin : 0)
CustomClippingRect {
CustomRect {
id: bubble
property real liveTargetWidth: root.isUser ? Math.min(msgText.implicitWidth + Tokens.padding.medium * 2, root.contentMaxWidth) : root.contentMaxWidth
@@ -37,8 +37,7 @@ Item {
implicitWidth: layoutFrozen ? frozenWidth : layoutWidth
implicitHeight: root.isUser ? msgText.contentHeight + Tokens.padding.medium * 2 : markdown.implicitHeight + markdown.anchors.topMargin * 2
anchors.right: root.isUser ? parent.right : undefined
layer.enabled: false
layer.smooth: true
clip: true
transform: Scale {
id: stretchScale
@@ -223,12 +223,13 @@ MouseArea {
height: width
opacity: modelData ? 1 : 0
CustomClippingRect {
CustomRect {
anchors.fill: parent
anchors.margins: Tokens.spacing.extraSmall
radius: Tokens.rounding.medium
color: Colors.tPalette.m3surfaceContainer
clip: true
FadeImage {
id: attImage