LCLQT5 doesn't call ThemeServices.OnThemeChange
Original Reporter info from Mantis: zpeterson @boramis
-
Reporter name: Zoë Peterson
Original Reporter info from Mantis: zpeterson @boramis
- Reporter name: Zoë Peterson
Description:
LCLQT5 doesn't call ThemeServices.OnThemeChange when the style is changed via QApplication_setStyle or externally if you're using qt5ct and change the system style while it's running. TQtWidgetSet.EventFilter does have a case for QEventStyleChange that gets hit a bunch, but it never matches the "Sender = QCoreApplication_instance" check.
It seems like OnThemeChange should also be called when the application palette changes (related issue, #38589 (closed))
Steps to reproduce:
The attached app has a listbox on the left that lists all of the styles available, and clicking on an item calls QApplication_setStyle. The SetPalette button just sets the application palette to random colors. The listbox below the button should add a message any time OnThemeChange or WMThemeChanged are encountered, but neither of them ever are.
To test, run it and click on the various styles, or install qt5ct, use the "qt5ct-style" style, then run qt5ct while the test app is still open and change the active style or palette. Adding a WriteLn in TQtWidgetSet.EventFilter's QEventStyleChange, outside the if block, does get hit.
Mantis conversion info:
- Mantis ID: 38592
- Version: 2.0.13 (SVN)