From 812b1db7f8927daaea2fb7001fbb238483de7e00 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 14 Nov 2016 12:05:14 +0000 Subject: [PATCH] SpkToolbar: Use new property InactiveTabHeaderFontColor when painting inactive tabs. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5349 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/spktoolbar/SpkToolbar/SpkToolbar.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/spktoolbar/SpkToolbar/SpkToolbar.pas b/components/spktoolbar/SpkToolbar/SpkToolbar.pas index 5136ad95d..bb43ea9c1 100644 --- a/components/spktoolbar/SpkToolbar/SpkToolbar.pas +++ b/components/spktoolbar/SpkToolbar/SpkToolbar.pas @@ -1378,12 +1378,14 @@ procedure TSpkToolbar.ValidateBuffer; var x, y: integer; TabRect: T2DIntRect; + clr: TColor; begin TabRect := FTabRects[index]; FBuffer.canvas.font.Assign(AFont); if AOverrideTextColor <> clNone then - FBuffer.Canvas.Font.Color := AOverrideTextColor; + clr := AOverrideTextColor else + clr := AFont.Color; x := TabRect.left + (TabRect.Width - FBuffer.Canvas.textwidth( FTabs[index].Caption)) div 2; y := TabRect.top + (TabRect.Height - FBuffer.Canvas.Textheight('Wy')) div 2; @@ -1392,7 +1394,7 @@ procedure TSpkToolbar.ValidateBuffer; x, y, FTabs[index].Caption, - AFont.Color, + clr, FTabClipRect); end;