mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-28 19:02:54 +02:00
gtk2: allocate background color in TextOut when drawing opaque text (same as what was done for ExtTextOut in rev 38758 #06660654be). Issue #31187
git-svn-id: trunk@53838 -
This commit is contained in:
parent
42132a8872
commit
9108c60199
@ -9593,15 +9593,10 @@ begin
|
||||
EnsureGCColor(DC, dccCurrentTextColor, True, False);
|
||||
|
||||
BackGroundColor := nil;
|
||||
if Assigned(DevCtx.GDIObjects[gdiBrush]) and (DevCtx.BkMode = OPAQUE) and
|
||||
Assigned(DevCtx.CurrentBackColor.Colormap) then
|
||||
if DevCtx.BkMode = OPAQUE then
|
||||
begin
|
||||
EnsureGCColor(DC, dccCurrentBackColor, DevCtx.GDIObjects[gdiBrush]^.GDIBrushFill = GDK_SOLID, True);
|
||||
//do not set BackGroundColor if CurrentBrush.Color = CurrentBackColor.
|
||||
//issue #22719
|
||||
if TGDKColorToTColor(DevCtx.CurrentBackColor.Color) <>
|
||||
TGDKColorToTColor(DevCtx.GetBrush^.GDIBrushColor.Color) then
|
||||
BackGroundColor := @DevCtx.CurrentBackColor.Color;
|
||||
AllocGDIColor(DC, @DevCtx.CurrentBackColor);
|
||||
BackGroundColor := @DevCtx.CurrentBackColor.Color;
|
||||
end;
|
||||
|
||||
DevCtx.DrawTextWithColors(Str, Count,
|
||||
|
Loading…
Reference in New Issue
Block a user