AnchorDocking: improved header appearance, patch by Don Siders, issue #40677

(cherry picked from commit 3b5bda9882)
This commit is contained in:
Maxim Ganetsky 2024-01-02 18:18:34 +03:00
parent 4dfdd2f3ce
commit 6eb05623c2

View File

@ -6688,7 +6688,7 @@ begin
Canvas.TextOut(r.Left+dx-1,r.Bottom-dy,Caption);
if HeaderStyle.StyleDesc.NeedDrawHeaderAfterText then begin
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Left,r.Top,r.Right,r.Bottom-dy-TxtW-1),false,FFocused);
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Left,r.Bottom-dy+1,r.Right,r.Bottom),false,FFocused);
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Left,r.Bottom-dy+2,r.Right,r.Bottom),false,FFocused);
end;
end else begin
// text does not fit
@ -6706,7 +6706,7 @@ begin
Canvas.TextRect(r,dx+2,dy,Caption);
if HeaderStyle.StyleDesc.NeedDrawHeaderAfterText then begin
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Left,r.Top,r.Left+dx-1,r.Bottom),true,FFocused);
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Left+dx+TxtW+2,r.Top,r.Right,r.Bottom),true,FFocused);
HeaderStyle.DrawProc(Canvas,HeaderStyle.StyleDesc,Rect(r.Right-dx+5,r.Top,r.Right,r.Bottom),true,FFocused);
end;
end else begin
// text does not fit
@ -8255,8 +8255,8 @@ end;
procedure DrawFrame3DHeader(Canvas: TCanvas; {%H-}Style: TADHeaderStyleDesc; r: TRect;
{%H-}Horizontal: boolean; {%H-}Focused: boolean);
begin
Canvas.Frame3d(r,2,bvLowered);
Canvas.Frame3d(r,4,bvRaised);
Canvas.Frame3d(r,1,bvLowered);
Canvas.Frame3d(r,3,bvRaised);
end;
procedure DrawFrameLine(Canvas: TCanvas; {%H-}Style: TADHeaderStyleDesc; r: TRect;