From 97a65514f04eb2db667c5ee22ec99472a8dc78c9 Mon Sep 17 00:00:00 2001 From: SineStriker <trueful@163.com> Date: 周日, 17 12月 2023 16:09:06 +0800 Subject: [PATCH] Test on Mac --- src/widgets/widgetwindowagent_mac.cpp | 9 +++++---- examples/mainwindow/dark-style.qss | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/mainwindow/dark-style.qss b/examples/mainwindow/dark-style.qss index 275613b..383eee6 100644 --- a/examples/mainwindow/dark-style.qss +++ b/examples/mainwindow/dark-style.qss @@ -16,6 +16,7 @@ border: none; color: #ECECEC; background-color: transparent; + min-height: 28px; } diff --git a/src/widgets/widgetwindowagent_mac.cpp b/src/widgets/widgetwindowagent_mac.cpp index d09f7b3..c21327c 100644 --- a/src/widgets/widgetwindowagent_mac.cpp +++ b/src/widgets/widgetwindowagent_mac.cpp @@ -40,14 +40,15 @@ void WidgetWindowAgent::setSystemButtonArea(QWidget *widget) { Q_D(WidgetWindowAgent); + auto ctx = d->context.get(); d->systemButtonAreaWidget = widget; if (!widget) { - systemButtonAreaWidgetEventFilter.reset(); - d->context->setSystemButtonArea({}); + d->systemButtonAreaWidgetEventFilter.reset(); + ctx->setSystemButtonArea({}); return; } - systemButtonAreaWidgetEventFilter = - std::make_unique<SystemButtonAreaWidgetEventFilter>(widget, d->context); + d->systemButtonAreaWidgetEventFilter = + std::make_unique<SystemButtonAreaWidgetEventFilter>(widget, ctx); } } \ No newline at end of file -- Gitblit v1.9.1