馃崚 Replaced deprecated signal with events handling
QApplication::paletteChanged is deprecated in Qt6, and they want us to listen to the events on the QWidget-level.
(cherry picked from commit 45b2eea8)