diff --git a/debian/dde-shell.install b/debian/dde-shell.install index 1ccbd3973..27afeefd6 100644 --- a/debian/dde-shell.install +++ b/debian/dde-shell.install @@ -23,6 +23,7 @@ usr/share/dsg/configs/org.deepin.dde.shell/org.deepin.dde.shell.notification.jso usr/share/dsg/configs/org.deepin.dde.shell/org.deepin.ds.dde-apps.json usr/share/dde-shell/*/translations usr/share/dde-dock/icons/dcc-setting/*.svg +usr/lib/*/qt6/qml/org/deepin/ds/notification/* usr/lib/*/qt6/qml/org/deepin/ds/notificationcenter/* usr/lib/*/dde-shell/org.deepin.ds.notificationcenter* usr/share/dde-shell/org.deepin.ds.notificationcenter*/ diff --git a/panels/notification/CMakeLists.txt b/panels/notification/CMakeLists.txt index 5b6e66d80..9ca089af5 100644 --- a/panels/notification/CMakeLists.txt +++ b/panels/notification/CMakeLists.txt @@ -33,6 +33,7 @@ target_link_libraries(ds-notification-shared PUBLIC install(TARGETS ds-notification-shared DESTINATION "${LIB_INSTALL_DIR}") ds_install_package(PACKAGE org.deepin.ds.notification TARGET ds-notification) +add_subdirectory(plugin) add_subdirectory(bubble) add_subdirectory(center) add_subdirectory(osd) diff --git a/panels/notification/bubble/bubbleitem.cpp b/panels/notification/bubble/bubbleitem.cpp index d8baa5528..a389b07d8 100644 --- a/panels/notification/bubble/bubbleitem.cpp +++ b/panels/notification/bubble/bubbleitem.cpp @@ -172,6 +172,7 @@ BubbleItem::BubbleItem(const NotifyEntity &entity, QObject *parent) void BubbleItem::setEntity(const NotifyEntity &entity) { m_entity = entity; + updateActions(); QVariantMap hints = entity.hints(); if (hints.contains("urgency")) { @@ -229,68 +230,36 @@ qint64 BubbleItem::ctime() const return m_entity.cTime(); } -bool BubbleItem::hasDisplayAction() const +QString BubbleItem::defaultAction() const { - return displayActions().count() >= 2; + return m_defaultAction; } -bool BubbleItem::hasDefaultAction() const +QVariantList BubbleItem::actions() const { - return defaultActionIdIndex() >= 0; + return m_actions; } -QString BubbleItem::defaultActionText() const +void BubbleItem::updateActions() { - const auto index = defaultActionTextIndex(); - if (index < 0) - return QString(); - - return m_entity.actions().at(index); -} - -QString BubbleItem::defaultActionId() const -{ - const auto index = defaultActionIdIndex(); - if (index < 0) - return QString(); - - return m_entity.actions().at(index); -} - -QString BubbleItem::firstActionText() const -{ - if (!hasDisplayAction()) - return QString(); - - return displayActions().at(1); -} - -QString BubbleItem::firstActionId() const -{ - if (!hasDisplayAction()) - return QString(); - - return displayActions().at(0); -} - -QStringList BubbleItem::actionTexts() const -{ - QStringList res; - const auto tmp = displayActions(); - for (int i = 3; i < tmp.count(); i += 2) - res << tmp[i]; - - return res; -} + QStringList actions = m_entity.actions(); + const auto defaultIndex = actions.indexOf(QLatin1String("default")); + if (defaultIndex >= 0) { + actions.remove(defaultIndex, 2); + m_defaultAction = QLatin1String("default"); + } -QStringList BubbleItem::actionIds() const -{ - QStringList res; - const auto tmp = displayActions(); - for (int i = 2; i < tmp.count(); i += 2) - res << tmp[i]; + QVariantList array; + for (int i = 0; i < actions.size(); i += 2) { + const auto id = actions[i]; + const auto text = actions[i + 1]; + QVariantMap item; + item["id"] = id; + item["text"] = text; + array.append(item); + } - return res; + m_actions = array; } int BubbleItem::level() const @@ -330,32 +299,6 @@ void BubbleItem::setEnablePreview(bool enable) m_enablePreview = enable; } -int BubbleItem::defaultActionIdIndex() const -{ - return m_entity.actions().indexOf("default"); -} - -int BubbleItem::defaultActionTextIndex() const -{ - const auto index = defaultActionIdIndex(); - if (index >= 0) - return index + 1; - - return -1; -} - -QStringList BubbleItem::displayActions() const -{ - const auto defaultIndex = defaultActionIdIndex(); - if (defaultIndex >= 0) { - auto tmp = m_entity.actions(); - tmp.remove(defaultIndex, 1); - return tmp; - } - - return m_entity.actions(); -} - QString BubbleItem::displayText() const { return m_enablePreview ? m_entity.body() : tr("1 new message"); diff --git a/panels/notification/bubble/bubbleitem.h b/panels/notification/bubble/bubbleitem.h index b2da6f89c..453f1c2c3 100644 --- a/panels/notification/bubble/bubbleitem.h +++ b/panels/notification/bubble/bubbleitem.h @@ -34,14 +34,9 @@ class BubbleItem : public QObject QString bodyImagePath() const; qint64 ctime() const; - bool hasDisplayAction() const; - bool hasDefaultAction() const; - QString defaultActionText() const; - QString defaultActionId() const; - QString firstActionText() const; - QString firstActionId() const; - QStringList actionTexts() const; - QStringList actionIds() const; + QString defaultAction() const; + QVariantList actions() const; + void updateActions(); int level() const; void setLevel(int level); @@ -57,19 +52,16 @@ class BubbleItem : public QObject void timeTipChanged(); private: - int defaultActionIdIndex() const; - int defaultActionTextIndex() const; - QStringList displayActions() const; QString displayText() const; private: NotifyEntity m_entity; - -private: int m_level = 0; int m_urgency = NotifyEntity::Normal; QString m_timeTip; bool m_enablePreview = true; + QVariantList m_actions; + QString m_defaultAction; }; } diff --git a/panels/notification/bubble/bubblemodel.cpp b/panels/notification/bubble/bubblemodel.cpp index 4126efdd6..7bc6ef920 100644 --- a/panels/notification/bubble/bubblemodel.cpp +++ b/panels/notification/bubble/bubblemodel.cpp @@ -174,18 +174,10 @@ QVariant BubbleModel::data(const QModelIndex &index, int role) const return m_bubbles[row]->bodyImagePath(); case BubbleModel::OverlayCount: return overlayCount(); - case BubbleModel::hasDefaultAction: - return m_bubbles[row]->hasDefaultAction(); - case BubbleModel::hasDisplayAction: - return m_bubbles[row]->hasDisplayAction(); - case BubbleModel::FirstActionText: - return m_bubbles[row]->firstActionText(); - case BubbleModel::FirstActionId: - return m_bubbles[row]->firstActionId(); - case BubbleModel::ActionTexts: - return m_bubbles[row]->actionTexts(); - case BubbleModel::ActionIds: - return m_bubbles[row]->actionIds(); + case BubbleModel::DefaultAction: + return m_bubbles[row]->defaultAction(); + case BubbleModel::Actions: + return m_bubbles[row]->actions(); case BubbleModel::Urgency: return m_bubbles[row]->urgency(); default: @@ -207,12 +199,8 @@ QHash BubbleModel::roleNames() const mapRoleNames[BubbleModel::Urgency] = "urgency"; mapRoleNames[BubbleModel::BodyImagePath] = "bodyImagePath"; mapRoleNames[BubbleModel::OverlayCount] = "overlayCount"; - mapRoleNames[BubbleModel::hasDefaultAction] = "hasDefaultAction"; - mapRoleNames[BubbleModel::hasDisplayAction] = "hasDisplayAction"; - mapRoleNames[BubbleModel::FirstActionText] = "firstActionText"; - mapRoleNames[BubbleModel::FirstActionId] = "firstActionId"; - mapRoleNames[BubbleModel::ActionTexts] = "actionTexts"; - mapRoleNames[BubbleModel::ActionIds] = "actionIds"; + mapRoleNames[BubbleModel::DefaultAction] = "defaultAction"; + mapRoleNames[BubbleModel::Actions] = "actions"; return mapRoleNames; } diff --git a/panels/notification/bubble/bubblemodel.h b/panels/notification/bubble/bubblemodel.h index 0fdbbfe08..61f1b4488 100644 --- a/panels/notification/bubble/bubblemodel.h +++ b/panels/notification/bubble/bubblemodel.h @@ -27,13 +27,8 @@ class BubbleModel : public QAbstractListModel TimeTip, BodyImagePath, OverlayCount, - hasDefaultAction, - hasDisplayAction, - FirstActionText, - FirstActionId, - DefaultActionId, - ActionTexts, - ActionIds, + DefaultAction, + Actions, Urgency, } BubbleRole; diff --git a/panels/notification/bubble/bubblepanel.cpp b/panels/notification/bubble/bubblepanel.cpp index 19b7418bf..eb657576f 100644 --- a/panels/notification/bubble/bubblepanel.cpp +++ b/panels/notification/bubble/bubblepanel.cpp @@ -78,16 +78,6 @@ BubbleModel *BubblePanel::bubbles() const return m_bubbles; } -void BubblePanel::invokeDefaultAction(int bubbleIndex) -{ - auto bubble = bubbleItem(bubbleIndex); - if (!bubble) - return; - - m_bubbles->remove(bubbleIndex); - onActionInvoked(bubble->id(), bubble->bubbleId(), bubble->defaultActionId()); -} - void BubblePanel::invokeAction(int bubbleIndex, const QString &actionId) { auto bubble = bubbleItem(bubbleIndex); diff --git a/panels/notification/bubble/bubblepanel.h b/panels/notification/bubble/bubblepanel.h index bf7878007..6d869523c 100644 --- a/panels/notification/bubble/bubblepanel.h +++ b/panels/notification/bubble/bubblepanel.h @@ -43,7 +43,6 @@ class BubblePanel : public DS_NAMESPACE::DPanel bool enabled() const; public Q_SLOTS: - void invokeDefaultAction(int bubbleIndex); void invokeAction(int bubbleIndex, const QString &actionId); void close(int bubbleIndex); void delayProcess(int bubbleIndex); diff --git a/panels/notification/bubble/package/BubbleAction.qml b/panels/notification/bubble/package/BubbleAction.qml deleted file mode 100644 index 4b302aedd..000000000 --- a/panels/notification/bubble/package/BubbleAction.qml +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 - -import org.deepin.dtk 1.0 as D - -RowLayout { - property var bubble - signal actionInvoked(var actionId) - - D.Button { - Layout.preferredWidth: 60 - height: 40 - text: bubble.firstActionText - onClicked: { - actionInvoked(bubble.firstActionId) - } - } - - Loader { - active: bubble.actionTexts.length > 0 - sourceComponent: bubble.actionTexts.length <= 1 ? singleAction : multiActions - } - Component { - id: singleAction - D.Button { - width: 100 - Layout.preferredHeight: 40 - text: bubble.actionTexts[0] - onClicked: { - actionInvoked(bubble.actionIds[index]) - } - } - } - Component { - id: multiActions - ComboBox { - width: 80 - model: bubble.actionTexts - delegate: Button { - width: 60 - height: 40 - text: modelData - onClicked: { - actionInvoked(bubble.actionIds[index]) - } - } - } - } -} diff --git a/panels/notification/bubble/package/BubbleContent.qml b/panels/notification/bubble/package/BubbleContent.qml deleted file mode 100644 index 9a01c4949..000000000 --- a/panels/notification/bubble/package/BubbleContent.qml +++ /dev/null @@ -1,191 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 - -import org.deepin.ds 1.0 -import org.deepin.dtk 1.0 as D - -D.Control { - id: control - property var bubble - property bool closeVisible: control.hovered || closePlaceHolder.hovered - - contentItem: RowLayout { - Layout.minimumHeight: 40 - - ColumnLayout { - Layout.topMargin: 8 - Layout.leftMargin: 8 - - D.DciIcon { - sourceSize: Qt.size(24, 24) - name: bubble.iconName - } - - Item { - Layout.fillHeight: true - } - } - - ColumnLayout { - spacing: 0 - Layout.topMargin: 4 - Layout.bottomMargin: 4 - Layout.rightMargin: 6 - Layout.fillWidth: true - Layout.fillHeight: true - - // The first line: appName and timeTip - RowLayout { - Text { - visible: bubble.appName - Layout.alignment: Qt.AlignLeft - elide: Text.ElideRight - text: bubble.appName - Layout.minimumWidth: 0 - maximumLineCount: 1 - font: D.DTK.fontManager.t9 - color: D.DTK.themeType === D.ApplicationHelper.DarkType ? - Qt.rgba(1, 1, 1, 0.6) : Qt.rgba(0, 0, 0, 0.6) - } - - Item { - Layout.fillWidth: true - } - - Text { - id: timeTip - Layout.alignment: Qt.AlignRight - Layout.rightMargin: 5 - visible: !control.closeVisible - elide: Text.ElideRight - text: bubble.timeTip - maximumLineCount: 1 - font: D.DTK.fontManager.t9 - color: D.DTK.themeType === D.ApplicationHelper.DarkType ? - Qt.rgba(1, 1, 1, 0.6) : Qt.rgba(0, 0, 0, 0.6) - } - } - - // The second line: summary - Text { - visible: bubble.summary !== "" - Layout.alignment: Qt.AlignLeft - Layout.rightMargin: 5 - elide: Text.ElideRight - text: bubble.summary - Layout.fillWidth: true - maximumLineCount: 1 - font: D.DTK.fontManager.t8 - textFormat: Text.PlainText - wrapMode: Text.WordWrap - } - - // The third line: body and image - RowLayout { - Text { - id: bodyText - visible: bubble.body !== "" - Layout.alignment: Qt.AlignLeft - Layout.rightMargin: 5 - elide: Text.ElideRight - text: bubble.body - Layout.fillWidth: true - maximumLineCount: 6 - font: D.DTK.fontManager.t8 - color: palette.windowText - wrapMode: Text.WordWrap - linkColor: palette.highlight - onLinkActivated: function (link) { - console.log("Link actived", link) - D.ApplicationHelper.openUrl(link) - } - HoverHandler { - enabled: bodyText.hoveredLink !== "" - cursorShape: Qt.PointingHandCursor - } - } - - Item { - Layout.preferredHeight: 1 - Layout.fillWidth: true - } - - Image { - Layout.maximumWidth: 106 - Layout.maximumHeight: 106 - Layout.minimumWidth: 16 - Layout.minimumHeight: 16 - visible: bubble.bodyImagePath !== "" - source: bubble.bodyImagePath - Layout.alignment: Qt.AlignRight - - fillMode: Image.PreserveAspectFit - } - } - - // single line action buttons - Loader { - Layout.topMargin: 6 - Layout.rightMargin: 8 - Layout.alignment: Qt.AlignRight | Qt.AlignBottom - active: bubble.hasDisplayAction && bubble.urgency === 2 - sourceComponent: BubbleAction { - bubble: control.bubble - onActionInvoked: function(actionId) { - console.log("action", actionId, bubble.index) - Applet.invokeAction(bubble.index, actionId) - } - } - } - } - } - - // hover action buttons - Loader { - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: 8 - active: control.hovered && bubble.hasDisplayAction && bubble.urgency !== 2 - sourceComponent: BubbleAction { - bubble: control.bubble - onActionInvoked: function(actionId) { - console.log("action", actionId, bubble.index) - Applet.invokeAction(bubble.index, actionId) - } - } - } - - Control { - id: closePlaceHolder - focus: true - anchors { - top: parent.top - topMargin: -height / 2 - right: parent.right - rightMargin: -width / 2 - } - width: 20 - height: 20 - contentItem: Loader { - active: control.closeVisible - sourceComponent: D.Button { - id: closeBtn - icon.name: "window-close" - icon.width: 16 - icon.height: 16 - onClicked: { - console.log("close process", bubble.index) - Applet.close(bubble.index) - } - background: D.BoxPanel { - radius: closeBtn.height / 2 - } - } - } - } -} diff --git a/panels/notification/bubble/package/NormalBubble.qml b/panels/notification/bubble/package/NormalBubble.qml index 4f5f91e41..9ee8dac12 100644 --- a/panels/notification/bubble/package/NormalBubble.qml +++ b/panels/notification/bubble/package/NormalBubble.qml @@ -6,14 +6,31 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import org.deepin.ds 1.0 +import org.deepin.ds.notification 1.0 import org.deepin.dtk 1.0 as D D.Control { id: control property var bubble - contentItem: BubbleContent { - bubble: control.bubble + contentItem: NotifyItemContent { + width: 360 + appName: bubble.appName + iconName: bubble.iconName + date: bubble.timeTip + actions: bubble.actions + title: bubble.summary + content: bubble.body + strongInteractive: bubble.urgency === 2 + contentIcon: bubble.bodyImagePath + onRemove: function () { + console.log("remove notify", bubble.appName) + Applet.close(bubble.index) + } + onActionInvoked: function (actionId) { + console.log("action notify", bubble.appName, actionId) + Applet.invokeAction(bubble.index, actionId) + } } z: bubble.level <= 1 ? 0 : 1 - bubble.level @@ -32,11 +49,11 @@ D.Control { anchors.fill: parent hoverEnabled: true onClicked: { - if (!bubble.hasDefaultAction) + if (!bubble.defaultAction) return console.log("default action", bubble.index) - Applet.invokeDefaultAction(bubble.index) + Applet.invokeDefaultAction(bubble.index, bubble.defaultAction) } property bool longPressed onPressAndHold: { diff --git a/panels/notification/bubble/package/main.qml b/panels/notification/bubble/package/main.qml index 61aeff4f6..0021f1f57 100644 --- a/panels/notification/bubble/package/main.qml +++ b/panels/notification/bubble/package/main.qml @@ -50,6 +50,7 @@ Window { DWindow.enabled: true DWindow.windowEffect: PlatformHandle.EffectNoBorder | PlatformHandle.EffectNoShadow color: "transparent" + DWindow.windowRadius: 0 // DWindow.enableBlurWindow: true screen: Qt.application.screens[0] // TODO `Qt.application.screens[0]` maybe invalid, why screen is changed. diff --git a/panels/notification/center/AnimationSettingButton.qml b/panels/notification/center/AnimationSettingButton.qml index d4fe2953a..8d4e7938b 100644 --- a/panels/notification/center/AnimationSettingButton.qml +++ b/panels/notification/center/AnimationSettingButton.qml @@ -5,6 +5,7 @@ import QtQuick import QtQuick.Controls import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter SettingActionButton { diff --git a/panels/notification/center/CMakeLists.txt b/panels/notification/center/CMakeLists.txt index ab86f257e..4b59ccc15 100644 --- a/panels/notification/center/CMakeLists.txt +++ b/panels/notification/center/CMakeLists.txt @@ -2,31 +2,21 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -set_source_files_properties(NotifyStyle.qml PROPERTIES - QT_QML_SINGLETON_TYPE TRUE -) - qt_add_qml_module(notificationcenterpanel PLUGIN_TARGET notificationcenterpanelplugin URI org.deepin.ds.notificationcenter VERSION 1.0 QML_FILES NotifyCenter.qml - NotifyStyle.qml NotifyStaging.qml NotifyHeader.qml NotifyView.qml NotifyViewDelegate.qml - NotifyItemBackground.qml - NotifyItem.qml - NotifyItemContent.qml NormalNotify.qml OverlapNotify.qml GroupNotify.qml - NotifyAction.qml NotifySetting.qml NotifySettingMenu.qml - SettingActionButton.qml AnimationSettingButton.qml BoundingRectangle.qml DataPanel.qml diff --git a/panels/notification/center/GroupNotify.qml b/panels/notification/center/GroupNotify.qml index 26fff3aeb..f91aa0088 100644 --- a/panels/notification/center/GroupNotify.qml +++ b/panels/notification/center/GroupNotify.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter NotifyItem { diff --git a/panels/notification/center/NormalNotify.qml b/panels/notification/center/NormalNotify.qml index b91dad713..cc7a4e2b1 100644 --- a/panels/notification/center/NormalNotify.qml +++ b/panels/notification/center/NormalNotify.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter NotifyItem { diff --git a/panels/notification/center/NotifyHeader.qml b/panels/notification/center/NotifyHeader.qml index d6bd1d032..c1d22decb 100644 --- a/panels/notification/center/NotifyHeader.qml +++ b/panels/notification/center/NotifyHeader.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter FocusScope { diff --git a/panels/notification/center/NotifyStaging.qml b/panels/notification/center/NotifyStaging.qml index 2cf6f4997..9761d62a7 100644 --- a/panels/notification/center/NotifyStaging.qml +++ b/panels/notification/center/NotifyStaging.qml @@ -5,6 +5,7 @@ import QtQuick import QtQuick.Controls import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter FocusScope { diff --git a/panels/notification/center/NotifyViewDelegate.qml b/panels/notification/center/NotifyViewDelegate.qml index 7e828031a..553a4afe3 100644 --- a/panels/notification/center/NotifyViewDelegate.qml +++ b/panels/notification/center/NotifyViewDelegate.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Controls import Qt.labs.qmlmodels import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter DelegateChooser { diff --git a/panels/notification/center/OverlapNotify.qml b/panels/notification/center/OverlapNotify.qml index fd67ea530..cff305e06 100644 --- a/panels/notification/center/OverlapNotify.qml +++ b/panels/notification/center/OverlapNotify.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 +import org.deepin.ds.notification import org.deepin.ds.notificationcenter NotifyItem { diff --git a/panels/notification/plugin/CMakeLists.txt b/panels/notification/plugin/CMakeLists.txt new file mode 100644 index 000000000..0946b9b0d --- /dev/null +++ b/panels/notification/plugin/CMakeLists.txt @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set_source_files_properties(NotifyStyle.qml PROPERTIES + QT_QML_SINGLETON_TYPE TRUE +) + +qt_add_qml_module(notificationplugin + PLUGIN_TARGET notificationplugin + URI org.deepin.ds.notification + VERSION 1.0 + QML_FILES + NotifyStyle.qml + NotifyItemBackground.qml + NotifyItem.qml + NotifyItemContent.qml + NotifyAction.qml + SettingActionButton.qml + OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notification/ +) + +install(TARGETS notificationplugin DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notification/") +install(DIRECTORY "${PROJECT_BINARY_DIR}/plugins/org/deepin/ds/notification/" DESTINATION "${QML_INSTALL_DIR}/org/deepin/ds/notification/") diff --git a/panels/notification/center/NotifyAction.qml b/panels/notification/plugin/NotifyAction.qml similarity index 98% rename from panels/notification/center/NotifyAction.qml rename to panels/notification/plugin/NotifyAction.qml index 44950a969..bc6b1d895 100644 --- a/panels/notification/center/NotifyAction.qml +++ b/panels/notification/plugin/NotifyAction.qml @@ -7,7 +7,7 @@ import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 import org.deepin.dtk.private 1.0 as DP -import org.deepin.ds.notificationcenter +import org.deepin.ds.notification Control { id: root diff --git a/panels/notification/center/NotifyItem.qml b/panels/notification/plugin/NotifyItem.qml similarity index 95% rename from panels/notification/center/NotifyItem.qml rename to panels/notification/plugin/NotifyItem.qml index c478f7ac8..61199cce9 100644 --- a/panels/notification/center/NotifyItem.qml +++ b/panels/notification/plugin/NotifyItem.qml @@ -6,7 +6,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 -import org.deepin.ds.notificationcenter +import org.deepin.ds.notification Control { id: root diff --git a/panels/notification/center/NotifyItemBackground.qml b/panels/notification/plugin/NotifyItemBackground.qml similarity index 96% rename from panels/notification/center/NotifyItemBackground.qml rename to panels/notification/plugin/NotifyItemBackground.qml index aa3c3476e..808a4770e 100644 --- a/panels/notification/center/NotifyItemBackground.qml +++ b/panels/notification/plugin/NotifyItemBackground.qml @@ -4,7 +4,7 @@ import QtQuick import org.deepin.dtk 1.0 -import org.deepin.ds.notificationcenter +import org.deepin.ds.notification FloatingPanel { id: root diff --git a/panels/notification/center/NotifyItemContent.qml b/panels/notification/plugin/NotifyItemContent.qml similarity index 99% rename from panels/notification/center/NotifyItemContent.qml rename to panels/notification/plugin/NotifyItemContent.qml index b12663abc..cd8f48b12 100644 --- a/panels/notification/center/NotifyItemContent.qml +++ b/panels/notification/plugin/NotifyItemContent.qml @@ -7,7 +7,7 @@ import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 import org.deepin.dtk.style 1.0 as DStyle -import org.deepin.ds.notificationcenter +import org.deepin.ds.notification NotifyItem { id: root diff --git a/panels/notification/center/NotifyStyle.qml b/panels/notification/plugin/NotifyStyle.qml similarity index 100% rename from panels/notification/center/NotifyStyle.qml rename to panels/notification/plugin/NotifyStyle.qml diff --git a/panels/notification/center/SettingActionButton.qml b/panels/notification/plugin/SettingActionButton.qml similarity index 98% rename from panels/notification/center/SettingActionButton.qml rename to panels/notification/plugin/SettingActionButton.qml index d1d9ab38c..e85b7f824 100644 --- a/panels/notification/center/SettingActionButton.qml +++ b/panels/notification/plugin/SettingActionButton.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Controls import org.deepin.dtk 1.0 -import org.deepin.ds.notificationcenter +import org.deepin.ds.notification ActionButton { id: root