From 1c2fa6baab89a24c53950bb1e14d58284c5cbaff Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 28 Mar 2021 21:19:47 +0000 Subject: [PATCH] ExCtrl: Add comment to explain previous commit. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7986 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/exctrls/source/exbuttons.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/exctrls/source/exbuttons.pas b/components/exctrls/source/exbuttons.pas index f1fdadc75..916deec8e 100644 --- a/components/exctrls/source/exbuttons.pas +++ b/components/exctrls/source/exbuttons.pas @@ -528,6 +528,8 @@ begin txtPt.Y := (Height - txtSize.CY + 1) div 2; R := Rect(txtPt.X, txtPt.Y, txtPt.X + txtSize.CX, txtPt.Y + txtSize.CY); + // Do not draw the text with DrawText(...) because it requires SingleLine=true + // for vertical centering. ts := lCanvas.TextStyle; ts.Alignment := lAlignment; ts.Layout := tlCenter;