LCLQT controls don't update properly when changing the application palette
Original Reporter info from Mantis: zpeterson @boramis
-
Reporter name: Zoë Peterson
Original Reporter info from Mantis: zpeterson @boramis
- Reporter name: Zoë Peterson
Description:
If you change the application palette using QApplication_setPalette, the cached system colors are cleared and a some of the interface updates appropriately, but forms and edits are still drawn with the old background color. Recreating the form's handle updates the appearance, but shouldn't be necessary. Creating a form/button/edit with raw QT commands will result in that window updating its appearance immediately.
Steps to reproduce:
The attached app demonstrates the problem. It creates two top level windows, one is an LCL TForm and the other is a raw QMainWindowH, both with buttons and an edit on them. Run it with "-style cde" to get the most noticeable results. Tested on Linux Mint.
The buttons on the main window are:
* Default Palette: Set the application palette to the active style's standardPalette.
* Light Palette/Dark Palette: Set the application palette to a fixed light or dark set of colors.
* RecreateWnd: Call RecreateWnd on the LCL form
When pressing any of the Palette buttons, the appearance of the raw QT window updates immediately, On the LCL form, a bunch of the drawing updates, but the form's background and the edit background are drawn incorrectly until you click the RecreateWnd button.
Mantis conversion info:
- Mantis ID: 38589
- Version: 2.0.13 (SVN)