mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-06 04:00:32 +01:00
TCustomCheckBoxThemed.PaintSelf: fix calculating the y pos.
In the old calculation "(ARect.Top+ARect.Bottom)div 2" there was a one pixel jump when traversing zero: -2 div 2 = -1 -1 div 2 = 0 0 div 2 = 0 1 div 2 = 0 // 3rd time 0 2 div 2 = 1 Now it is "Top + (Height div 2)" height does not change, so it never goes through 0. This manufactured a painting bug in Object Inspector, where ScrollWindowEx relies on a repaint at the correct position. git-svn-id: trunk@59650 -
This commit is contained in:
parent
7de0bcc720
commit
235888a37d
@ -373,8 +373,8 @@ begin
|
||||
aTextSize.cx := Right;
|
||||
aTextSize.cy := Bottom;
|
||||
end;
|
||||
aCaptionPoint.Y := (ARect.Bottom + ARect.Top - aTextSize.cy) div 2;
|
||||
aCheckBoxPoint.Y := (ARect.Bottom + ARect.Top - CheckBoxSize.cy) div 2;
|
||||
aCaptionPoint.Y := ARect.Top + (ARect.Bottom - ARect.Top - aTextSize.cy) div 2;
|
||||
aCheckBoxPoint.Y := ARect.Top + (ARect.Bottom - ARect.Top - CheckBoxSize.cy) div 2;
|
||||
if ARightToLeft xor (AAlignment = taLeftJustify) then begin { Caption is on the Left }
|
||||
aCheckBoxPoint.X := ARect.Right - CheckBoxSize.cx;
|
||||
aCaptionPoint.X := ARect.Left;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user