diff --git a/panels/notification/center/NotifyCenter.qml b/panels/notification/center/NotifyCenter.qml index 60da2605b..4306eec5d 100644 --- a/panels/notification/center/NotifyCenter.qml +++ b/panels/notification/center/NotifyCenter.qml @@ -50,6 +50,7 @@ FocusScope { anchors { top: parent.top left: parent.left + leftMargin: NotifyStyle.leftMargin } height: 40 width: NotifyStyle.contentItem.width @@ -77,7 +78,6 @@ FocusScope { top: header.bottom right: parent.right rightMargin: NotifyStyle.scrollBarPadding - topMargin: 10 bottom: parent.bottom } diff --git a/panels/notification/center/NotifyView.qml b/panels/notification/center/NotifyView.qml index fda1a00c5..12f13a8e0 100644 --- a/panels/notification/center/NotifyView.qml +++ b/panels/notification/center/NotifyView.qml @@ -7,6 +7,7 @@ import QtQuick.Controls import QtQuick.Layouts import org.deepin.dtk 1.0 import org.deepin.ds +import org.deepin.ds.notification import org.deepin.ds.notificationcenter Control { @@ -61,6 +62,8 @@ Control { keyNavigationEnabled: false activeFocusOnTab: false ScrollBar.vertical: ScrollBar { } + topMargin: 10 + leftMargin: NotifyStyle.leftMargin property int nextIndex: -1 property int pendingFocusIndex: -1 // Index to focus after expand operation property bool panelShown: false diff --git a/panels/notification/center/package/main.qml b/panels/notification/center/package/main.qml index ff63c4d7b..11d5f8816 100644 --- a/panels/notification/center/package/main.qml +++ b/panels/notification/center/package/main.qml @@ -63,7 +63,7 @@ Window { flags: Qt.Tool property int contentPadding: 20 - width: NotifyStyle.contentItem.width + contentPadding * 2 + width: NotifyStyle.contentItem.width + NotifyStyle.leftMargin +contentPadding * 2 // height: 800 DLayerShellWindow.layer: DLayerShellWindow.LayerOverlay DLayerShellWindow.anchors: DLayerShellWindow.AnchorRight | DLayerShellWindow.AnchorTop | DLayerShellWindow.AnchorBottom diff --git a/panels/notification/plugin/NotifyStyle.qml b/panels/notification/plugin/NotifyStyle.qml index 93aa4878a..a6f91804b 100644 --- a/panels/notification/plugin/NotifyStyle.qml +++ b/panels/notification/plugin/NotifyStyle.qml @@ -15,4 +15,5 @@ QtObject { property int width: 360 } property int scrollBarPadding: 2 + property int leftMargin: 20 }