mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 11:19:24 +02:00
IDE: fix the wrongly calculated offset to bring out-of-screen windows to screen.
git-svn-id: trunk@30259 -
This commit is contained in:
parent
263c53ebd7
commit
1fbf4abaa6
@ -1053,9 +1053,9 @@ begin
|
|||||||
if NewBounds.Bottom<20 then
|
if NewBounds.Bottom<20 then
|
||||||
OffsetRect(NewBounds,0,20-NewBounds.Bottom);
|
OffsetRect(NewBounds,0,20-NewBounds.Bottom);
|
||||||
if NewBounds.Left>Screen.DesktopWidth-20 then
|
if NewBounds.Left>Screen.DesktopWidth-20 then
|
||||||
OffsetRect(NewBounds,NewBounds.Left-(Screen.DesktopWidth-20),0);
|
OffsetRect(NewBounds,(Screen.DesktopWidth-20)-NewBounds.Left,0);
|
||||||
if NewBounds.Top>Screen.DesktopHeight-20 then
|
if NewBounds.Top>Screen.DesktopHeight-20 then
|
||||||
OffsetRect(NewBounds,NewBounds.Top-(Screen.DesktopHeight-20),0);
|
OffsetRect(NewBounds,(Screen.DesktopHeight-20)-NewBounds.Top,0);
|
||||||
// set bounds (do not use SetRestoredBounds - that flickers with the current LCL implementation)
|
// set bounds (do not use SetRestoredBounds - that flickers with the current LCL implementation)
|
||||||
AForm.SetBounds(
|
AForm.SetBounds(
|
||||||
NewBounds.Left,NewBounds.Top,
|
NewBounds.Left,NewBounds.Top,
|
||||||
|
Loading…
Reference in New Issue
Block a user