Skip to content

Commit 3ecea3b

Browse files
author
AlexOne
committed
feat: 支持无标题、窗口圆角、系统菜单
窗口圆角、系统菜单兼容旧借口,新增无标题栏的适配 Log: 支持无标题、窗口圆角、系统菜单 Task: https://pms.uniontech.com/zentao/task-view-93008.html Influence: 所有dtk应用的标题栏、窗口圆角 Change-Id: Ia847505216521c0206776b5159fe4ae5b41df1b8
1 parent 99b89b3 commit 3ecea3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/kernel/dplatformhandle.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,10 @@ class Q_DECL_HIDDEN CreatorWindowEventFile : public QObject {
626626
*/
627627
bool DPlatformHandle::setEnabledNoTitlebarForWindow(QWindow *window, bool enable)
628628
{
629-
if (!isDXcbPlatform())
629+
auto isDWaylandPlatform = [] {
630+
return qApp->platformName() == "dwayland" || qApp->property("_d_isDwayland").toBool();
631+
};
632+
if (!(isDXcbPlatform() || isDWaylandPlatform()))
630633
return false;
631634

632635
QFunctionPointer enable_no_titlear = nullptr;

0 commit comments

Comments
 (0)