feat: user notes (#6122)

Fixes #2413
This commit is contained in:
fourtf
2025-04-13 13:38:56 +02:00
committed by GitHub
parent 3ba25dd33d
commit 37061dd3bd
12 changed files with 312 additions and 73 deletions
+23 -18
View File
@@ -484,6 +484,28 @@ bool BaseWindow::supportsCustomWindowFrame()
#endif
}
void BaseWindow::windowDeactivationEvent()
{
switch (this->windowDeactivateAction)
{
case WindowDeactivateAction::Delete:
this->deleteLater();
break;
case WindowDeactivateAction::Close:
this->close();
break;
case WindowDeactivateAction::Hide:
this->hide();
break;
case WindowDeactivateAction::Nothing:
default:
break;
}
}
void BaseWindow::themeChangedEvent()
{
if (this->hasCustomWindowFrame())
@@ -520,24 +542,7 @@ bool BaseWindow::event(QEvent *event)
{
if (event->type() == QEvent::WindowDeactivate)
{
switch (this->windowDeactivateAction)
{
case WindowDeactivateAction::Delete:
this->deleteLater();
break;
case WindowDeactivateAction::Close:
this->close();
break;
case WindowDeactivateAction::Hide:
this->hide();
break;
case WindowDeactivateAction::Nothing:
default:
break;
}
this->windowDeactivationEvent();
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)