Skip to content

Commit

Permalink
feat: 支持无标题、窗口圆角、系统菜单
Browse files Browse the repository at this point in the history
窗口圆角、系统菜单兼容旧借口,新增无标题栏的适配

Log: 支持无标题、窗口圆角、系统菜单
Task: https://pms.uniontech.com/zentao/task-view-93008.html
Influence: 所有dtk应用的标题栏、窗口圆角
Change-Id: Ia847505216521c0206776b5159fe4ae5b41df1b8
  • Loading branch information
AlexOne committed Dec 9, 2021
1 parent 99b89b3 commit 3ecea3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kernel/dplatformhandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,10 @@ class Q_DECL_HIDDEN CreatorWindowEventFile : public QObject {
*/
bool DPlatformHandle::setEnabledNoTitlebarForWindow(QWindow *window, bool enable)
{
if (!isDXcbPlatform())
auto isDWaylandPlatform = [] {
return qApp->platformName() == "dwayland" || qApp->property("_d_isDwayland").toBool();
};
if (!(isDXcbPlatform() || isDWaylandPlatform()))
return false;

QFunctionPointer enable_no_titlear = nullptr;
Expand Down

0 comments on commit 3ecea3b

Please sign in to comment.