Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: widget's not in center #58

Merged
merged 1 commit into from
Aug 24, 2023
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 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 = BubbleItemWidth; // 通知中心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
Loading