From 05f3e52f55c97c6552fd88481a8f830b6fa0743f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 29 Oct 2025 11:17:03 +0100 Subject: [PATCH] make notifs and page placeholder use new material shapes --- ...Symbol.qml => MaterialShapeWrappedMaterialSymbol.qml} | 4 ++-- .../ii/modules/common/widgets/NotificationAppIcon.qml | 9 ++++++--- .../.config/quickshell/ii/modules/sidebarLeft/AiChat.qml | 1 + dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml | 1 + .../ii/modules/sidebarLeft/PagePlaceholder.qml | 7 ++++--- 5 files changed, 14 insertions(+), 8 deletions(-) rename dots/.config/quickshell/ii/modules/common/widgets/{CookieWrappedMaterialSymbol.qml => MaterialShapeWrappedMaterialSymbol.qml} (90%) diff --git a/dots/.config/quickshell/ii/modules/common/widgets/CookieWrappedMaterialSymbol.qml b/dots/.config/quickshell/ii/modules/common/widgets/MaterialShapeWrappedMaterialSymbol.qml similarity index 90% rename from dots/.config/quickshell/ii/modules/common/widgets/CookieWrappedMaterialSymbol.qml rename to dots/.config/quickshell/ii/modules/common/widgets/MaterialShapeWrappedMaterialSymbol.qml index 996388a3c..b8c3469d6 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/CookieWrappedMaterialSymbol.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/MaterialShapeWrappedMaterialSymbol.qml @@ -2,7 +2,7 @@ import QtQuick import qs.modules.common import qs.modules.common.widgets -MaterialCookie { +MaterialShape { id: root property alias text: symbol.text property alias iconSize: symbol.iconSize @@ -13,7 +13,7 @@ MaterialCookie { color: Appearance.colors.colSecondaryContainer colSymbol: Appearance.colors.colOnSecondaryContainer - sides: 5 + shape: MaterialShape.Shape.Clover4Leaf implicitSize: Math.max(symbol.implicitWidth, symbol.implicitHeight) + padding * 2 diff --git a/dots/.config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml b/dots/.config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml index 8635f4f78..795a708be 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml @@ -6,7 +6,7 @@ import Quickshell import Quickshell.Widgets import Quickshell.Services.Notifications -MaterialCookie { // App icon +MaterialShape { // App icon id: root property var appIcon: "" property var summary: "" @@ -21,8 +21,11 @@ MaterialCookie { // App icon property real smallAppIconSize: implicitSize * smallAppIconScale implicitSize: 38 * scale - sides: isUrgent ? 10 : 0 - amplitude: implicitSize / 24 + property list urgentShapes: [ + MaterialShape.Shape.VerySunny, + MaterialShape.Shape.SoftBurst, + ] + shape: isUrgent ? urgentShapes[Math.floor(Math.random() * urgentShapes.length)] : MaterialShape.Shape.Circle color: isUrgent ? Appearance.colors.colPrimary : Appearance.colors.colSecondaryContainer Loader { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml index 6d00752bc..eff0483d3 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -369,6 +369,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) icon: "neurology" title: Translation.tr("Large language models") description: Translation.tr("Type /key to get started with online models\nCtrl+O to expand the sidebar\nCtrl+P to detach sidebar into a window") + shape: MaterialShape.Shape.PixelCircle } ScrollToBottomButton { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml index 4b398311e..c7a8c19a3 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml @@ -206,6 +206,7 @@ Item { icon: "bookmark_heart" title: Translation.tr("Anime boorus") description: "" + shape: MaterialShape.Shape.Bun } ScrollToBottomButton { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/PagePlaceholder.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/PagePlaceholder.qml index 9c41e64d0..c43eedbc4 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/PagePlaceholder.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/PagePlaceholder.qml @@ -7,9 +7,10 @@ Item { id: root property bool shown: true - property alias icon: cookieWrappedMaterialSymbol.text + property alias icon: shapeWidget.text property alias title: widgetNameText.text property alias description: widgetDescriptionText.text + property alias shape: shapeWidget.shape opacity: shown ? 1 : 0 visible: opacity > 0 @@ -27,8 +28,8 @@ Item { anchors.centerIn: parent spacing: 5 - CookieWrappedMaterialSymbol { - id: cookieWrappedMaterialSymbol + MaterialShapeWrappedMaterialSymbol { + id: shapeWidget Layout.alignment: Qt.AlignHCenter iconSize: 60 rotation: -60 * (1 - root.opacity)