mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 08:50:16 +02:00
win32: fix a regression which make TStaticText draw only using default text color if Transparent = True (bug #0018289)
git-svn-id: trunk@29864 -
This commit is contained in:
parent
fe636fc95e
commit
914f7c1903
@ -1388,6 +1388,7 @@ function StaticTextParentMsgHandler(const AWinControl: TWinControl; Window: HWnd
|
||||
var MsgResult: Windows.LResult; var WinProcess: Boolean): Boolean;
|
||||
var
|
||||
Info: PWin32WindowInfo;
|
||||
TextColor: TColor;
|
||||
begin
|
||||
Result := False;
|
||||
case Msg of
|
||||
@ -1398,9 +1399,13 @@ begin
|
||||
if Result then
|
||||
begin
|
||||
ThemeServices.DrawParentBackground(HWND(LParam), HDC(WParam), nil, False);
|
||||
MsgResult := GetStockObject(HOLLOW_BRUSH);
|
||||
MsgResult := Windows.GetStockObject(HOLLOW_BRUSH);
|
||||
WinProcess := False;
|
||||
SetBkMode(HDC(WParam), TRANSPARENT);
|
||||
Windows.SetBkMode(HDC(WParam), TRANSPARENT);
|
||||
TextColor := Info^.WinControl.Font.Color;
|
||||
if TextColor = clDefault then
|
||||
TextColor := Info^.WinControl.GetDefaultColor(dctFont);
|
||||
Windows.SetTextColor(HDC(WParam), ColorToRGB(TextColor));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user