mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:39:20 +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
|
and (not ComponentBoundsDesignable(TComponent(Item.Persistent))) then
|
||||||
continue;
|
continue;
|
||||||
OldLeftTop:=Items[i].OldFormRelativeLeftTop;
|
OldLeftTop:=Items[i].OldFormRelativeLeftTop;
|
||||||
NewLeft:=FLeft + (((OldLeftTop.X-FOldLeft) * FWidth) div FOldWidth);
|
NewLeft:=FLeft + round((single(OldLeftTop.X-FOldLeft) * single(FWidth))/single(FOldWidth));
|
||||||
NewTop:=FTop + (((OldLeftTop.Y-FOldTop) * FHeight) div FOldHeight);
|
NewTop:=FTop + round((single(OldLeftTop.Y-FOldTop) * single(FHeight))/single(FOldHeight));
|
||||||
NewWidth:=(Item.OldWidth*FWidth) div FOldWidth;
|
NewWidth:=round(single(Item.OldWidth*FWidth)/single(FOldWidth));
|
||||||
NewHeight:=(Item.OldHeight*FHeight) div FOldHeight;
|
NewHeight:=round(single(Item.OldHeight*FHeight)/single(FOldHeight));
|
||||||
if NewWidth<0 then begin
|
if NewWidth<0 then begin
|
||||||
NewWidth:=-NewWidth;
|
NewWidth:=-NewWidth;
|
||||||
dec(NewLeft,NewWidth);
|
dec(NewLeft,NewWidth);
|
||||||
|
Loading…
Reference in New Issue
Block a user