From 3ceba4380279b109a699f39e6d4a72e1795f06b5 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Thu, 4 Sep 2025 16:12:50 +0200 Subject: [PATCH] Notification: prefer notification image over app image --- Modules/Notification/Notification.qml | 6 ++++-- Modules/SettingsPanel/Extras/BarSectionEditor.qml | 1 + Services/FontService.qml | 2 +- Widgets/NPanel.qml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index f7eede8..7e72f2c 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -200,11 +200,13 @@ Variants { Layout.alignment: Qt.AlignTop // Start avatar aligned with body (below the summary) anchors.topMargin: textContent.childrenRect.y - imagePath: Icons.iconFromName(model.appIcon, "application-x-executable") + // Prefer notification-provided image (e.g., user avatar) then fall back to app icon + imagePath: (model.image && model.image !== "") ? model.image : Icons.iconFromName( + model.appIcon, "application-x-executable") fallbackIcon: "apps" borderColor: Color.transparent borderWidth: 0 - visible: imagePath && imagePath !== "" + visible: (imagePath && imagePath !== "") } Column { diff --git a/Modules/SettingsPanel/Extras/BarSectionEditor.qml b/Modules/SettingsPanel/Extras/BarSectionEditor.qml index 830ee46..cdfc8f6 100644 --- a/Modules/SettingsPanel/Extras/BarSectionEditor.qml +++ b/Modules/SettingsPanel/Extras/BarSectionEditor.qml @@ -378,6 +378,7 @@ NBox { if (targetWidget) { const targetCenterX = targetWidget.x + targetWidget.width / 2 if (mouseX > targetCenterX) { + // Mouse is to the right of target center, insert after //Logger.log("BarSectionEditor", "Inserting after widget at index:", targetIndex) } else { diff --git a/Services/FontService.qml b/Services/FontService.qml index e76557e..8b8ba6f 100644 --- a/Services/FontService.qml +++ b/Services/FontService.qml @@ -75,7 +75,7 @@ Singleton { } fontsLoaded = true - Logger.log("FontService", "Loaded", availableFonts.count, "fonts:" , monospaceFonts.count, "monospace,", + Logger.log("FontService", "Loaded", availableFonts.count, "fonts:", monospaceFonts.count, "monospace,", displayFonts.count, "display") } diff --git a/Widgets/NPanel.qml b/Widgets/NPanel.qml index d6326bf..6670b22 100644 --- a/Widgets/NPanel.qml +++ b/Widgets/NPanel.qml @@ -52,7 +52,8 @@ Loader { property alias isClosing: hideTimer.running readonly property real barHeight: Math.round(Style.barHeight * scaling) readonly property bool barAtBottom: Settings.data.bar.position === "bottom" - readonly property bool barIsVisible: (screen !== null) && (Settings.data.bar.monitors.includes(screen.name) || (Settings.data.bar.monitors.length === 0)) + readonly property bool barIsVisible: (screen !== null) && (Settings.data.bar.monitors.includes(screen.name) + || (Settings.data.bar.monitors.length === 0)) signal opened signal closed