LazControls: Center Caption of TCheckBoxThemed vertically. Issue #29054, patch from Gabor Boros.

git-svn-id: trunk@50457 -
This commit is contained in:
juha 2015-11-21 09:56:14 +00:00
parent 8098f1092f
commit d9d0b6a6c0

View File

@ -360,7 +360,7 @@ begin
if ARightToLeft then inc(aFlags, DT_RTLREADING);
with ThemeServices.GetTextExtent(ACanvas.Handle, aDetails, ACaption, aFlags, nil) do begin
aTextSize.cx := Right;
aTextSize.cy := Bottom + 2 * cFocusBorder;
aTextSize.cy := ACanvas.TextExtent(ACaption).cy;
end;
aCaptionPoint.Y := (ARect.Bottom + ARect.Top - aTextSize.cy) div 2;
aCheckBoxPoint.Y := (ARect.Bottom + ARect.Top - CheckBoxSize.cy) div 2;