diff --git a/src/widgets/daboutdialog.cpp b/src/widgets/daboutdialog.cpp index 3ee17afa..0f219d26 100644 --- a/src/widgets/daboutdialog.cpp +++ b/src/widgets/daboutdialog.cpp @@ -461,7 +461,7 @@ void DAboutDialog::setProductIcon(const QIcon &icon) #else winId(); // TODO: wait for checking auto window = windowHandle(); - d->logoLabel->setPixmap(icon.pixmap(window->baseSize(), window->screen()->devicePixelRatio())); + d->logoLabel->setPixmap(icon.pixmap(QSize(128, 128), window->screen()->devicePixelRatio())); #endif } diff --git a/src/widgets/dabstractdialog.cpp b/src/widgets/dabstractdialog.cpp index 57c29921..4a5c5e1c 100644 --- a/src/widgets/dabstractdialog.cpp +++ b/src/widgets/dabstractdialog.cpp @@ -68,6 +68,11 @@ void DAbstractDialogPrivate::init(bool blurIfPossible) q->setAttribute(Qt::WA_TranslucentBackground, blurIfPossible); } else if (noTitlebarEnabled()) { handle = new DPlatformWindowHandle(q, q); + + if (!handle->enableBlurWindow()) { + handle->setEnableBlurWindow(true); + } + // fix wayland no titlebar //q->setWindowFlags(q->windowFlags() | Qt::FramelessWindowHint); } diff --git a/src/widgets/ddialog.cpp b/src/widgets/ddialog.cpp index dd0f4a1a..815f1682 100644 --- a/src/widgets/ddialog.cpp +++ b/src/widgets/ddialog.cpp @@ -125,12 +125,14 @@ void DDialogPrivate::init() spacer = new QSpacerItem(1, 0); // MainLayout--TopLayout + mainLayout->setSpacing(0); mainLayout->addWidget(titleBar, 0, Qt::AlignTop); mainLayout->addWidget(contentWidget); mainLayout->setContentsMargins(QMargins(0, 0, 0, 0)); // MainLayout--ButtonLayout buttonLayout = new QHBoxLayout; + buttonLayout->setSpacing(5); buttonLayout->setContentsMargins(DIALOG::BUTTON_LAYOUT_LEFT_MARGIN, DIALOG::BUTTON_LAYOUT_TOP_MARGIN, DIALOG::BUTTON_LAYOUT_RIGHT_MARGIN, diff --git a/src/widgets/dmessagemanager.cpp b/src/widgets/dmessagemanager.cpp index 0d70826b..6e7a362b 100644 --- a/src/widgets/dmessagemanager.cpp +++ b/src/widgets/dmessagemanager.cpp @@ -68,17 +68,21 @@ template static void sendMessage_helper(DMessageManager *manager, QWidget *par, IconType icon, const QString &message) { QWidget *content = par->findChild(D_MESSAGE_MANAGER_CONTENT, Qt::FindDirectChildrenOnly); - int text_message_count = 0; - for (DFloatingMessage *message : content->findChildren(QString(), Qt::FindDirectChildrenOnly)) { - if (message->messageType() == DFloatingMessage::TransientType) { - ++text_message_count; + if (content) { + int text_message_count = 0; + + for (DFloatingMessage *message : content->findChildren(QString(), Qt::FindDirectChildrenOnly)) { + if (message->messageType() == DFloatingMessage::TransientType) { + ++text_message_count; + } } - } - // TransientType 类型的通知消息,最多只允许同时显示三个 - if (text_message_count >= 3) - return; + // TransientType 类型的通知消息,最多只允许同时显示三个 + if (text_message_count >= 3) { + return; + } + } DFloatingMessage *floMsg = new DFloatingMessage(DFloatingMessage::TransientType); floMsg->setAttribute(Qt::WA_DeleteOnClose);