diff --git a/components/spktoolbar/SpkToolbar/SpkToolbar.pas b/components/spktoolbar/SpkToolbar/SpkToolbar.pas index 6437d8865..91c880dbc 100644 --- a/components/spktoolbar/SpkToolbar/SpkToolbar.pas +++ b/components/spktoolbar/SpkToolbar/SpkToolbar.pas @@ -2197,6 +2197,7 @@ var MenuButtonWidth: Integer; AdditionalPadding: Boolean; MenuButtonTextWidth: Integer; + ToolbarHeight: Integer; {$IFDEF LCLCocoa} scalefactor: Double; {$ENDIF} @@ -2208,14 +2209,15 @@ begin FBuffer.Free; FBuffer := TBitmap.Create; + ToolbarHeight := CalcToolbarHeight; {$IFDEF LCLCocoa} scalefactor := GetCanvasScaleFactor; - FBuffer.SetSize(round(scaleFactor*Width), round(scaleFactor*CalcToolbarHeight)); + FBuffer.SetSize(round(scaleFactor*Width), round(scaleFactor*ToolbarHeight)); CGContextScaleCTM(TCocoaBitmapContext(FBuffer.Canvas.Handle).CGContext, scaleFactor, scaleFactor); {$ELSE} - FBuffer.SetSize(Width, CalcToolbarHeight); + FBuffer.SetSize(Width, ToolbarHeight); {$ENDIF} - SetBounds(Left, Top, FBuffer.Width, FBuffer.Height); + SetBounds(Left, Top, FBuffer.Width, ToolbarHeight); // *** Tabs ***