You've already forked lazarus-ccr
* Handle default font color (trunk)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4410 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8049,6 +8049,7 @@ procedure TVirtualTreeColumns.DrawButtonText(DC: HDC; Caption: String; Bounds: T
|
|||||||
|
|
||||||
var
|
var
|
||||||
TextSpace: Integer;
|
TextSpace: Integer;
|
||||||
|
TextColor: TColor;
|
||||||
Size: TSize;
|
Size: TSize;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -8065,12 +8066,11 @@ begin
|
|||||||
if not Enabled then
|
if not Enabled then
|
||||||
if FHeader.Treeview.VclStyleEnabled then
|
if FHeader.Treeview.VclStyleEnabled then
|
||||||
begin
|
begin
|
||||||
SetTextColor(DC, ColorToRGB(FHeader.Treeview.FColors.HeaderFontColor));
|
TextColor := FHeader.Treeview.FColors.HeaderFontColor;
|
||||||
{$ifdef Windows}
|
if TextColor = clDefault then
|
||||||
Windows.DrawTextW(DC, PWideChar(Caption), Length(Caption), Bounds, DrawFormat);
|
TextColor := clCaptionText;
|
||||||
{$else}
|
SetTextColor(DC, ColorToRGB(TextColor));
|
||||||
LCLIntf.DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
||||||
{$endif}
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -8084,9 +8084,12 @@ 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.Treeview.FColors.HeaderFontColor));
|
TextColor := FHeader.Treeview.FColors.HeaderFontColor;
|
||||||
|
if TextColor = clDefault then
|
||||||
|
TextColor := clCaptionText;
|
||||||
|
SetTextColor(DC, ColorToRGB(TextColor));
|
||||||
DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -32954,6 +32957,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