From d08030ea8f04f056aed88a4ad96dc9233d069787 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周一, 01 1月 2024 19:18:10 +0800 Subject: [PATCH] Add license --- examples/mainwindow/mainwindow.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp index 154aa62..7c50fa8 100644 --- a/examples/mainwindow/mainwindow.cpp +++ b/examples/mainwindow/mainwindow.cpp @@ -1,3 +1,6 @@ +// Copyright (C) 2023-2024 Stdware Collections +// SPDX-License-Identifier: Apache-2.0 + #include "mainwindow.h" #include <QtCore/QDebug> @@ -289,6 +292,13 @@ #endif windowAgent->setHitTestVisible(menuBar, true); +#ifdef Q_OS_MAC + windowAgent->setSystemButtonAreaCallback([](const QSize &size) { + static constexpr const int width = 75; + return QRect(QPoint(size.width() - width, 0), QSize(width, size.height())); // + }); +#endif + setMenuWidget(windowBar); // 3. Adds simulated mouse events to the title bar buttons -- Gitblit v1.9.1