fix: 修复托盘图标提示信息显示异常的问题

对提示的窗体设置无边框属性,避免在wayland下显示窗口标题

Log: 修复托盘图标提示信息显示异常的问题
Influence: 托盘提示信息显示
Bug: https://pms.uniontech.com/bug-view-150521.html
Change-Id: I50c67ebf555b590bd5ecf2554eb845c7a85ef360
This commit is contained in:
范朋程 2022-07-29 11:48:06 +08:00
parent 9aa5dd4639
commit a13a4f3b84

View File

@ -21,6 +21,7 @@
#include "snitraywidget.h"
#include "util/themeappicon.h"
#include "util/utils.h"
#include "../../widgets/tipswidget.h"
#include <dbusmenu-qt5/dbusmenuimporter.h>
@ -71,6 +72,10 @@ SNITrayWidget::SNITrayWidget(const QString &sniServicePath, QWidget *parent)
arrowRectangle->setArrowWidth(18);
arrowRectangle->setArrowHeight(10);
arrowRectangle->setObjectName("snitraypopup");
if (Utils::IS_WAYLAND_DISPLAY) {
Qt::WindowFlags flags = arrowRectangle->windowFlags() | Qt::FramelessWindowHint;
arrowRectangle->setWindowFlags(flags);
}
PopupWindow = arrowRectangle;
connect(qApp, &QApplication::aboutToQuit, PopupWindow, &DockPopupWindow::deleteLater);
}