QWaylandWindow: Update decoration when application palette/font changes

Ensures the decoration can redraw to adjust for the new colors/font.

Pick-to: 6.7 6.6 6.5
Change-Id: Ib46acde1d14baafda49f379f8279c396bc976bdc
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Kai Uwe Broulik 2024-01-04 21:02:33 +01:00
parent cc5d649c98
commit f1df592c96
2 changed files with 13 additions and 0 deletions

View File

@ -1788,6 +1788,17 @@ void QWaylandWindow::reinit()
}
}
bool QWaylandWindow::windowEvent(QEvent *event)
{
if (event->type() == QEvent::ApplicationPaletteChange
|| event->type() == QEvent::ApplicationFontChange) {
if (mWindowDecorationEnabled && window()->isVisible())
mWindowDecoration->update();
}
return QPlatformWindow::windowEvent(event);
}
}
QT_END_NAMESPACE

View File

@ -238,6 +238,8 @@ public:
virtual void reinit();
void reset();
bool windowEvent(QEvent *event) override;
public Q_SLOTS:
void applyConfigure();