Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion panels/notification/center/NormalNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions panels/notification/center/NotifyHeaderTitleText.qml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion panels/notification/center/OverlapNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -137,6 +137,7 @@ NotifyItem {
OverlapIndicator {
id: indicator
enableAnimation: root.ListView.view.panelShown
clipItems: true
anchors {
bottom: parent.bottom
left: parent.left
Expand All @@ -147,6 +148,7 @@ NotifyItem {
z: -1
count: root.count
background: NotifyItemBackground {
opacity: realIndex === 0 ? 0.6 : 0.4
backgroundColor: Palette {
normal {
common: ("transparent")
Expand Down
35 changes: 25 additions & 10 deletions panels/notification/center/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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,
Expand All @@ -161,7 +178,6 @@ Window {
top: parent.top
topMargin: contentPadding
left: parent.left
leftMargin: contentPadding
right: parent.right
bottom: parent.bottom
}
Expand All @@ -172,7 +188,6 @@ Window {
top: parent.top
left: parent.left
right: parent.right
rightMargin: contentPadding
}
// Tab navigation: staging -> header
onGotoHeaderFirst: notifyCenter.focusHeaderFirst()
Expand Down
9 changes: 1 addition & 8 deletions panels/notification/plugin/DropShadowText.qml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
}
}
1 change: 1 addition & 0 deletions panels/notification/plugin/NotifyItemBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Control {

padding: radius / 2

property int realIndex: 0
property int radius: 12
property Palette borderColor: Palette {
normal {
Expand Down
8 changes: 3 additions & 5 deletions panels/notification/plugin/NotifyItemContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions panels/notification/plugin/NotifyStyle.qml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -15,5 +15,5 @@ QtObject {
property int width: 360
}
property int scrollBarPadding: 2
property int leftMargin: 20
property int leftMargin: 10
}
4 changes: 3 additions & 1 deletion panels/notification/plugin/OverlapIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 {
Expand Down
8 changes: 3 additions & 5 deletions panels/notification/plugin/SettingActionButton.qml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
}
}

Expand Down
Loading