From 3fbcf1aa8f91a804af50fad4e2b122f698259c94 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 09 5æ 2024 23:45:28 +0800 Subject: [PATCH] Remove `isHostSizeFixed` in delegate --- examples/mainwindow/mainwindow.cpp | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp index 4021ec3..c704812 100644 --- a/examples/mainwindow/mainwindow.cpp +++ b/examples/mainwindow/mainwindow.cpp @@ -321,24 +321,6 @@ setMenuWidget(windowBar); - // 3. Adds simulated mouse events to the title bar buttons -#ifdef Q_OS_WINDOWS - // Emulate Window system menu button behaviors - connect(iconButton, &QAbstractButton::clicked, windowAgent, [this, iconButton] { - iconButton->setProperty("double-click-close", false); - - // Pick a suitable time threshold - QTimer::singleShot(75, windowAgent, [this, iconButton]() { - if (iconButton->property("double-click-close").toBool()) - return; - windowAgent->showSystemMenu(iconButton->mapToGlobal(QPoint{0, iconButton->height()})); - }); - }); - connect(iconButton, &QWK::WindowButton::doubleClicked, this, [iconButton, this]() { - iconButton->setProperty("double-click-close", true); - close(); - }); -#endif #ifndef Q_OS_MAC connect(windowBar, &QWK::WindowBar::minimizeRequested, this, &QWidget::showMinimized); -- Gitblit v1.9.1