TPanel and Brush.Color when Color=clDefault
Original Reporter info from Mantis: Blaazen @Blaazen
-
Reporter name: Vojtech Cihak
Original Reporter info from Mantis: Blaazen @Blaazen
- Reporter name: Vojtech Cihak
Description:
I sometimes need to have opaque component with the same color as Parent. I use Parent.Brush.Color but it does not work for TPanel when TPanel.Color is clDefault. It returns clBtnFace while it is painted with clForm.
I tested with GTK2 where it returns clBtnFace too but clBtnFace and clForm are same colors here, so I cannot distinguish whether it is Qt or LCL issue.
It gives correct results (clForm) when component is placed to GroupBox or directly to Form.
Steps to reproduce:
Run demo, click button. Component uses Parent.Brush.Color but it is clBtnFace while Parent is clForm.
Change Panel1.Color to any other non-clDefault and restart demo. Now Parent.Brush.Color has correct value.
Additional information:
Lazarus 1.1 r42568M FPC 2.7.1 x86_64-linux-qt
Mantis conversion info:
- Mantis ID: 24946
- OS: Linux
- OS Build: Chakra 64-bit
- Build: 42568
- Platform: amd64
- Version: 1.1 (SVN)
- Fixed in revision: 42629 (#f733b973)