diff --git a/panels/notification/center/NormalNotify.qml b/panels/notification/center/NormalNotify.qml index 77324eef8..2d577a85b 100644 --- a/panels/notification/center/NormalNotify.qml +++ b/panels/notification/center/NormalNotify.qml @@ -64,7 +64,7 @@ NotifyItem { backgroundColor: Palette { normal { common: ("transparent") - crystal: Qt.rgba(255 / 255.0, 255 / 255.0, 255 / 255.0, 0.7) + crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.7) } normalDark { crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.7) diff --git a/panels/notification/center/NotifyHeaderTitleText.qml b/panels/notification/center/NotifyHeaderTitleText.qml index 7ae5d4d3f..c7d9d1909 100644 --- a/panels/notification/center/NotifyHeaderTitleText.qml +++ b/panels/notification/center/NotifyHeaderTitleText.qml @@ -1,15 +1,18 @@ -// SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2025 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick import Qt5Compat.GraphicalEffects -import org.deepin.dtk 1.0 +import org.deepin.dtk 1.0 import org.deepin.ds.notification import org.deepin.ds.notificationcenter DropShadowText { property font tFont: DTK.fontManager.t4 + color: DTK.themeType === ApplicationHelper.DarkType ? + Qt.rgba(255, 255, 255, 0.7) : + Qt.rgba(0, 0, 0, 0.75) font { pixelSize: tFont.pixelSize family: tFont.family diff --git a/panels/notification/center/OverlapNotify.qml b/panels/notification/center/OverlapNotify.qml index 817297340..b5a4d6005 100644 --- a/panels/notification/center/OverlapNotify.qml +++ b/panels/notification/center/OverlapNotify.qml @@ -125,7 +125,7 @@ NotifyItem { backgroundColor: Palette { normal { common: ("transparent") - crystal: Qt.rgba(255 / 255.0, 255 / 255.0, 255 / 255.0, 0.7) + crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.7) } normalDark { crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.7) @@ -137,6 +137,7 @@ NotifyItem { OverlapIndicator { id: indicator enableAnimation: root.ListView.view.panelShown + clipItems: true anchors { bottom: parent.bottom left: parent.left @@ -147,6 +148,7 @@ NotifyItem { z: -1 count: root.count background: NotifyItemBackground { + opacity: realIndex === 0 ? 0.6 : 0.4 backgroundColor: Palette { normal { common: ("transparent") diff --git a/panels/notification/center/package/main.qml b/panels/notification/center/package/main.qml index affe721f0..ec129f95d 100644 --- a/panels/notification/center/package/main.qml +++ b/panels/notification/center/package/main.qml @@ -67,7 +67,7 @@ Window { switch (position) { case 0: { // DOCK_TOP let visibleHeight = Math.max(0, dockGeometry.y + dockGeometry.height - screenGeometry.y) - return Math.min(visibleHeight, dockGeometry.height) + return Math.min(visibleHeight, dockGeometry.height) } case 1: { // DOCK_RIGHT let visibleWidth = Math.max(0, screenGeometry.x + screenGeometry.width - dockGeometry.x) @@ -84,14 +84,14 @@ Window { visible: Panel.visible flags: Qt.Tool - property int contentPadding: 20 - width: NotifyStyle.contentItem.width + NotifyStyle.leftMargin +contentPadding * 2 + property int contentPadding: 10 + width: NotifyStyle.contentItem.width + contentPadding * 2 // height: 800 DLayerShellWindow.layer: DLayerShellWindow.LayerOverlay DLayerShellWindow.anchors: DLayerShellWindow.AnchorRight | DLayerShellWindow.AnchorTop | DLayerShellWindow.AnchorBottom - DLayerShellWindow.topMargin: windowMargin(0) - DLayerShellWindow.rightMargin: windowMargin(1) - DLayerShellWindow.bottomMargin: windowMargin(2) + DLayerShellWindow.topMargin: windowMargin(0) + contentPadding + DLayerShellWindow.rightMargin: windowMargin(1) + contentPadding + DLayerShellWindow.bottomMargin: windowMargin(2) + contentPadding DLayerShellWindow.exclusionZone: -1 DLayerShellWindow.keyboardInteractivity: DLayerShellWindow.KeyboardInteractivityOnDemand palette: DTK.palette @@ -103,6 +103,8 @@ Window { DWindow.enabled: true color: "transparent" DWindow.enableBlurWindow: true + DWindow.borderColor: DTK.themeType === ApplicationHelper.DarkType ? Qt.rgba(0, 0, 0, 0.8) : Qt.rgba(0, 0, 0, 0.06) + // 修复:通知中心屏幕跟随任务栏屏幕,而不是硬编码为第一个屏幕 screen: getDockScreen() // TODO `Qt.application.screens[0]` maybe invalid, why screen is changed. @@ -135,17 +137,32 @@ Window { } } + + function blendColorAlpha(fallback) { + var appearance = DS.applet("org.deepin.ds.dde-appearance") + if (!appearance || appearance.opacity < 0) + return fallback + return appearance.opacity + } + // only add blendColor effect when DWindow.enableBlurWindow is true, // avoid to updating blur area frequently.-- StyledBehindWindowBlur { + InsideBoxBorder { + anchors.fill: parent + radius: DTK.platformTheme.windowRadius + color: DTK.themeType === ApplicationHelper.DarkType ? + Qt.rgba(1, 1, 1, 0.1) : + Qt.rgba(0, 0, 0, 0.1) + } control: parent anchors.fill: parent cornerRadius: 0 blendColor: { if (valid) { return DStyle.Style.control.selectColor(undefined, - Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, dock.blendColorAlpha(0.6)), - Qt.rgba(10 / 255, 10 / 255, 10 /255, dock.blendColorAlpha(85 / 255))) + Qt.rgba(238 / 255.0, 238 / 255.0, 238 / 255.0, blendColorAlpha(0.8)), + Qt.rgba(20 / 255, 20 / 255, 20 /255, blendColorAlpha(0.8))) } return DStyle.Style.control.selectColor(undefined, DStyle.Style.behindWindowBlur.lightNoBlurColor, @@ -161,7 +178,6 @@ Window { top: parent.top topMargin: contentPadding left: parent.left - leftMargin: contentPadding right: parent.right bottom: parent.bottom } @@ -172,7 +188,6 @@ Window { top: parent.top left: parent.left right: parent.right - rightMargin: contentPadding } // Tab navigation: staging -> header onGotoHeaderFirst: notifyCenter.focusHeaderFirst() diff --git a/panels/notification/plugin/DropShadowText.qml b/panels/notification/plugin/DropShadowText.qml index 4a96d5f6a..f1098b886 100644 --- a/panels/notification/plugin/DropShadowText.qml +++ b/panels/notification/plugin/DropShadowText.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2025 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -9,11 +9,4 @@ import org.deepin.ds.notificationcenter Text { color: Qt.rgba(1, 1, 1, 1) - layer.enabled: true - layer.effect: DropShadow { - color: Qt.rgba(0, 0, 0, 0.6) - radius: 4 - samples: 9 - verticalOffset: 1 - } } diff --git a/panels/notification/plugin/NotifyItemBackground.qml b/panels/notification/plugin/NotifyItemBackground.qml index 85fc54cf7..fb46a193c 100644 --- a/panels/notification/plugin/NotifyItemBackground.qml +++ b/panels/notification/plugin/NotifyItemBackground.qml @@ -11,6 +11,7 @@ Control { padding: radius / 2 + property int realIndex: 0 property int radius: 12 property Palette borderColor: Palette { normal { diff --git a/panels/notification/plugin/NotifyItemContent.qml b/panels/notification/plugin/NotifyItemContent.qml index b0fb50e4f..8b583f688 100644 --- a/panels/notification/plugin/NotifyItemContent.qml +++ b/panels/notification/plugin/NotifyItemContent.qml @@ -104,7 +104,7 @@ NotifyItem { top: parent.top topMargin: -height / 2 right: parent.right - rightMargin: -width / 2 + rightMargin: -width / 2 + 6 } width: 20 height: 20 @@ -149,12 +149,10 @@ NotifyItem { color1: Palette { normal { common: ("transparent") - // TODO crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) - crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 1.0) + crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) } normalDark { - // TODO crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) - crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 1.0) + crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5) } } color2: color1 diff --git a/panels/notification/plugin/NotifyStyle.qml b/panels/notification/plugin/NotifyStyle.qml index a6f91804b..759f95d55 100644 --- a/panels/notification/plugin/NotifyStyle.qml +++ b/panels/notification/plugin/NotifyStyle.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -15,5 +15,5 @@ QtObject { property int width: 360 } property int scrollBarPadding: 2 - property int leftMargin: 20 + property int leftMargin: 10 } diff --git a/panels/notification/plugin/OverlapIndicator.qml b/panels/notification/plugin/OverlapIndicator.qml index df94424d6..12007e0b6 100644 --- a/panels/notification/plugin/OverlapIndicator.qml +++ b/panels/notification/plugin/OverlapIndicator.qml @@ -15,6 +15,7 @@ Item { property int overlapHeight: 8 property bool revert: false property bool enableAnimation: false + property bool clipItems: false implicitHeight: layout.height implicitWidth: 360 @@ -35,7 +36,7 @@ Item { Layout.preferredWidth: root.width - (realIndex) * radius * 2 Layout.alignment: Qt.AlignHCenter z: -realIndex - clip: true + clip: root.clipItems Loader { id: contentLoader @@ -52,6 +53,7 @@ Item { sourceComponent: root.background onLoaded: function() { + contentLoader.item.realIndex = Qt.binding(function() { return item.realIndex; }) if (root.enableAnimation) { fadeInAnimation.start() } else { diff --git a/panels/notification/plugin/SettingActionButton.qml b/panels/notification/plugin/SettingActionButton.qml index a696ef9aa..7651ecb96 100644 --- a/panels/notification/plugin/SettingActionButton.qml +++ b/panels/notification/plugin/SettingActionButton.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -36,12 +36,10 @@ ActionButton { color1: Palette { normal { common: ("transparent") - // TODO crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) - crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 1.0) + crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) } normalDark { - // TODO crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5) - crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 1.0) + crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5) } }