Skip to content

Commit

Permalink
fix: widget's not in center
Browse files Browse the repository at this point in the history
adjust left margin of widget

Issue: linuxdeepin/developer-center#5256
  • Loading branch information
FeiWang1119 committed Aug 23, 2023
1 parent 62cdf20 commit 4f92018
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace Edit {

namespace Display {
static const QSize EditSize(140, 36);
static const int leftMargin = 0;
static const int leftMargin = 10;
static const int rightMargin = 10;
static const int topMargin = 0;
static const int bottomMargin = 0;
Expand Down
10 changes: 5 additions & 5 deletions notification/notification/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ static const int BubbleStartPos = -(BubbleWindowHeight + ScreenPadding); // 窗
static const int BubbleItemHeight = 90; // 通知中心气泡默认高度
static const int BubbleItemTitleHeight = 37; // 通知中心气泡的标题高度
static const int BubbleItemBodyHeight = BubbleItemHeight - BubbleItemTitleHeight; // 通知中心气泡的内容默认高度
static const int BubbleItemWidth = 350; // 通知中心气泡默认宽度
static const int BubbleItemWidth = 360; // 通知中心气泡默认宽度
static const int BubbleAppBodyPaddingTop = 10; // 通知气泡app body顶部间隔
static const int BubbleAppBodyPaddingBottom = 10; // 通知气泡app body低部间隔
static const int BubbleAppBodyVerticalPadding = BubbleAppBodyPaddingTop + BubbleAppBodyPaddingBottom; // 通知气泡app body上下间隔之和
static const int BubbleTitleHeight = 50; // 通知中心App名称默认高度
static const int BubbleTitleWidth = 350; // 通知中心App名称默认宽度
static const int BubbleTitleWidth = 360; // 通知中心App名称默认宽度

static const QStringList Directory = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
static const QString CachePath = Directory.first() + "/.cache/deepin/deepin-notifications/";
Expand Down Expand Up @@ -88,8 +88,8 @@ static const QStringList IgnoreList= {
};

namespace Notify {
static const int CenterWidth = 350;
static const int CenterMargin = 10;
static const int CenterWidth = BubbleItemWidth;
static const int CenterMargin = 0;
static const int CenterTitleHeight = 36;
static const int GroupTitleHeight = 32;
static const int BubbleCloseButtonSize = 24;
Expand Down Expand Up @@ -127,7 +127,7 @@ class OSD
if (style == BUBBLEWINDOW) {
size = QSize(600, BubbleWindowHeight);
} else if (style == BUBBLEWIDGET) {
size = QSize(350, 90);
size = QSize(BubbleItemWidth, 90);
}
return size;
}
Expand Down

0 comments on commit 4f92018

Please sign in to comment.