mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 18:58:17 +02:00
IDE: designer: resize multiple controls: round mathematically instead of always down, needed for increase size by 1
git-svn-id: branches/fixes_1_4@47901 -
This commit is contained in:
parent
a8b626bfe7
commit
661eb76ac5
@ -1346,10 +1346,10 @@ begin
|
||||
and (not ComponentBoundsDesignable(TComponent(Item.Persistent))) then
|
||||
continue;
|
||||
OldLeftTop:=Items[i].OldFormRelativeLeftTop;
|
||||
NewLeft:=FLeft + (((OldLeftTop.X-FOldLeft) * FWidth) div FOldWidth);
|
||||
NewTop:=FTop + (((OldLeftTop.Y-FOldTop) * FHeight) div FOldHeight);
|
||||
NewWidth:=(Item.OldWidth*FWidth) div FOldWidth;
|
||||
NewHeight:=(Item.OldHeight*FHeight) div FOldHeight;
|
||||
NewLeft:=FLeft + round((single(OldLeftTop.X-FOldLeft) * single(FWidth))/single(FOldWidth));
|
||||
NewTop:=FTop + round((single(OldLeftTop.Y-FOldTop) * single(FHeight))/single(FOldHeight));
|
||||
NewWidth:=round(single(Item.OldWidth*FWidth)/single(FOldWidth));
|
||||
NewHeight:=round(single(Item.OldHeight*FHeight)/single(FOldHeight));
|
||||
if NewWidth<0 then begin
|
||||
NewWidth:=-NewWidth;
|
||||
dec(NewLeft,NewWidth);
|
||||
|
Loading…
Reference in New Issue
Block a user