From 04ce9ccbb4a1b4ee8ee1850f90af886412852b9f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:25:46 +1000 Subject: internal: better colourisation --- modules/lock/Fetch.qml | 10 ++-------- modules/lock/NotifGroup.qml | 16 ++++------------ 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'modules/lock') diff --git a/modules/lock/Fetch.qml b/modules/lock/Fetch.qml index ce64c8c..8f82e88 100644 --- a/modules/lock/Fetch.qml +++ b/modules/lock/Fetch.qml @@ -1,12 +1,10 @@ pragma ComponentBehavior: Bound import qs.components -import qs.components.widgets import qs.components.effects import qs.services import qs.config import qs.utils -import Quickshell.Widgets import Quickshell.Services.UPower import QtQuick import QtQuick.Layouts @@ -149,15 +147,11 @@ ColumnLayout { visible: active } - component OsLogo: IconImage { + component OsLogo: ColouredIcon { source: SysInfo.osLogo implicitSize: height - asynchronous: true - + colour: Colours.palette.m3primary layer.enabled: Config.lock.recolourLogo || SysInfo.isDefaultLogo - layer.effect: Colouriser { - colorizationColor: Colours.palette.m3primary - } } component FetchText: MonoText { diff --git a/modules/lock/NotifGroup.qml b/modules/lock/NotifGroup.qml index b119503..9af3947 100644 --- a/modules/lock/NotifGroup.qml +++ b/modules/lock/NotifGroup.qml @@ -62,15 +62,11 @@ StyledRect { Component { id: appIconComp - IconImage { + ColouredIcon { implicitSize: Math.round(Config.notifs.sizes.image * 0.6) source: Quickshell.iconPath(root.appIcon) - asynchronous: true - + colour: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer layer.enabled: root.appIcon.endsWith("symbolic") - layer.effect: Colouriser { - colorizationColor: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer - } } } @@ -109,16 +105,12 @@ StyledRect { color: root.urgency === "critical" ? Colours.palette.m3error : root.urgency === "low" ? Colours.palette.m3surfaceContainerHighest : Colours.palette.m3secondaryContainer radius: Appearance.rounding.full - IconImage { + ColouredIcon { anchors.centerIn: parent implicitSize: Math.round(Config.notifs.sizes.badge * 0.6) source: Quickshell.iconPath(root.appIcon) - asynchronous: true - + colour: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer layer.enabled: root.appIcon.endsWith("symbolic") - layer.effect: Colouriser { - colorizationColor: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer - } } } } -- cgit v1.2.3-freya