fix: reduce shader usage
This commit is contained in:
@@ -19,7 +19,7 @@ Item {
|
||||
required property Wrapper popouts
|
||||
|
||||
function resolveIcon(app: string, icon: string): string {
|
||||
if (app === "chrome_status_icon_1") {
|
||||
if (app === "discord_status_icon_1" && Config.bar.tray.replaceIcons) {
|
||||
return Quickshell.iconPath("discord-tray");
|
||||
} else if (app === "AyuGramDesktop") {
|
||||
if (icon === Quickshell.iconPath("com.ayugram.desktop-attention-symbolic"))
|
||||
@@ -50,6 +50,8 @@ Item {
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StateLayer {
|
||||
id: layer
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
anchors.fill: parent
|
||||
color: icon.layer.enabled && root.current ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
|
||||
@@ -33,8 +33,7 @@ Item {
|
||||
y: parent.y
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
}
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +100,7 @@ Item {
|
||||
value: Audio.volume
|
||||
|
||||
Behavior on value {
|
||||
Anim {
|
||||
}
|
||||
Anim {}
|
||||
}
|
||||
|
||||
onInteraction: value => Audio.setVolume(value)
|
||||
@@ -123,7 +121,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
CustomClippingRect {
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.small * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
@@ -136,17 +134,21 @@ Item {
|
||||
node: Audio.source
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
id: sourcePeakFill
|
||||
CustomClippingRect {
|
||||
anchors.fill: parent
|
||||
radius: parent.radius
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * sourcePeak.peak
|
||||
CustomRect {
|
||||
id: sourcePeakFill
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * sourcePeak.peak
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,8 +197,7 @@ Item {
|
||||
value: Audio.sourceVolume
|
||||
|
||||
Behavior on value {
|
||||
Anim {
|
||||
}
|
||||
Anim {}
|
||||
}
|
||||
|
||||
onInteraction: value => Audio.setSourceVolume(value)
|
||||
@@ -230,7 +231,7 @@ Item {
|
||||
|
||||
model: Audio.streams.filter(s => s.isSink)
|
||||
|
||||
CustomClippingRect {
|
||||
CustomRect {
|
||||
id: appBox
|
||||
|
||||
required property int index
|
||||
@@ -248,17 +249,21 @@ Item {
|
||||
node: appBox.modelData
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
id: peakFill
|
||||
CustomClippingRect {
|
||||
anchors.fill: parent
|
||||
radius: parent.radius
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * peak.peak
|
||||
CustomRect {
|
||||
id: peakFill
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * peak.peak
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,8 +321,7 @@ Item {
|
||||
value: appBox.modelData.audio.volume
|
||||
|
||||
Behavior on value {
|
||||
Anim {
|
||||
}
|
||||
Anim {}
|
||||
}
|
||||
|
||||
onInteraction: value => Audio.setStreamVolume(appBox.modelData, value)
|
||||
|
||||
@@ -9,7 +9,7 @@ import qs.Modules
|
||||
import qs.Helpers
|
||||
import qs.Services
|
||||
|
||||
CustomClippingRect {
|
||||
CustomRect {
|
||||
id: root
|
||||
|
||||
readonly property bool hasUpdates: Object.keys(Updates.updates)?.length > 0
|
||||
@@ -73,6 +73,7 @@ CustomClippingRect {
|
||||
implicitHeight: Math.min(contentHeight, (root.itemHeight + spacing) * 5 - spacing)
|
||||
implicitWidth: contentWidth
|
||||
spacing: Tokens.spacing.medium
|
||||
clip: true
|
||||
|
||||
delegate: CustomRect {
|
||||
id: update
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import QtQuick
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
|
||||
Reference in New Issue
Block a user