[lazarus] New Bug Entered

Claude Rieth claude.rieth at team.lu
Mon Nov 24 03:50:10 EST 2003


23/11/03 14:06:25, Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

>Mattias Gaertner wrote:
>
>> On Sun,  9 Nov 2003 07:31:17 -0500 (EST)  bugtracker at miraclec.com wrote:
>> 
>> 
>>>Title: IDE: SnapToGrid BugFix
>>>
>>>Entered by: Claude Rieth
>>>
>>>To obtain REAL snap to grid and not only modulo gridsize function, the
>>>following patch needs to be applied (gives behaviour similar to delphi)
>>>
>>>controlselection.pp
>>>
>>>function ...FindNearestSnapRight
>>>.
>>>.
>>>FindNearestGridX(NearestRight);
>>>//add the following
>>>if NearestRight.Valid then
>>>  NearestRight.Nearest:=NearestRight.Nearest+1;
>> 
>> 
>> The snapping seems to work correct. The grid leftmost, topmost pixel is
>> painted at 0,0 and the grid snaps to 0,0.
>> 
>> What does Delphi do?
>> 
>> 
>> Mattias
>
>Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod 
>gridsize) + 1). I don't know the reasoning for that, though, I always 
>have found it odd, because then you can't place buttons side by side 
>easily: they overlap with 1 pixel by default.
>
>Micha.
>

Maybe add it as an option in settings, Grid ?

Regards,
Claude



>_________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
>








More information about the Lazarus mailing list