You've already forked lazarus-ccr
* Fix handling of default color font. Issue 29008
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4408 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -7520,6 +7520,7 @@ procedure TVirtualTreeColumns.DrawButtonText(DC: HDC; Caption: String; Bounds: T
|
|||||||
|
|
||||||
var
|
var
|
||||||
TextSpace: Integer;
|
TextSpace: Integer;
|
||||||
|
TextColor: TColor;
|
||||||
Size: TSize;
|
Size: TSize;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@@ -7545,9 +7546,15 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if Hot then
|
if Hot then
|
||||||
SetTextColor(DC, ColorToRGB(FHeader.Treeview.FColors.HeaderHotColor))
|
TextColor := FHeader.Treeview.FColors.HeaderHotColor
|
||||||
else
|
else
|
||||||
SetTextColor(DC, ColorToRGB(FHeader.FFont.Color));
|
begin
|
||||||
|
if FHeader.FFont.Color = clDefault then
|
||||||
|
TextColor := clCaptionText
|
||||||
|
else
|
||||||
|
TextColor := FHeader.FFont.Color;
|
||||||
|
end;
|
||||||
|
SetTextColor(DC, ColorToRGB(TextColor));
|
||||||
DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -30983,6 +30990,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if Canvas.Font.Color = clDefault then
|
||||||
|
Canvas.Font.Color := clWindowText;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user