mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 09:38:13 +02:00
gtk: all custom controls need EraseBackground (not only those who don't have csOpaque) (fixes #0013224)
git-svn-id: trunk@18825 -
This commit is contained in:
parent
8c52991db1
commit
9d9c9448c5
@ -30,17 +30,15 @@
|
||||
function DoDeliverPaintMessage(const Target: TObject; var PaintMsg: TLMPaint): PtrInt;
|
||||
begin
|
||||
{
|
||||
erase backgound of not csOpaque custom controls
|
||||
|
||||
erase backgound of custom controls
|
||||
use only for real custom controls for gtk1 - that are GTKAPIWidget
|
||||
}
|
||||
|
||||
if (TObject(Target) is TCustomControl) and
|
||||
if (TObject(Target) is TCustomControl)
|
||||
{$ifdef gtk1}
|
||||
GtkWidgetIsA(PGtkWidget(TCustomControl(Target).Handle), GTKAPIWidget_Type) and
|
||||
and GtkWidgetIsA(PGtkWidget(TCustomControl(Target).Handle), GTKAPIWidget_Type)
|
||||
{$endif}
|
||||
not (csOpaque in TWinControl(Target).ControlStyle) then
|
||||
begin
|
||||
then begin
|
||||
//DebugLn('LM_ERASEBKGND for: ', dbgsName(TCustomControl(Target)));
|
||||
Include(TWinControlAccess(Target).FWinControlFlags, wcfEraseBackground);
|
||||
TWinControl(Target).Perform(LM_ERASEBKGND, PaintMsg.DC, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user