mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-26 04:21:35 +01:00
Fix window positioning for dual screen, and systems with negative coordinates
git-svn-id: trunk@31792 -
This commit is contained in:
parent
ae4ca89551
commit
d4f742aa96
@ -1059,9 +1059,9 @@ begin
|
|||||||
NewBounds.Bottom:=NewBounds.Top+60;
|
NewBounds.Bottom:=NewBounds.Top+60;
|
||||||
// move to visible area
|
// move to visible area
|
||||||
if NewBounds.Right<Screen.DesktopLeft+60 then
|
if NewBounds.Right<Screen.DesktopLeft+60 then
|
||||||
OffsetRect(NewBounds,60-NewBounds.Right,0);
|
OffsetRect(NewBounds,Screen.DesktopLeft+60-NewBounds.Right,0);
|
||||||
if NewBounds.Bottom<Screen.DesktopTop+60 then
|
if NewBounds.Bottom<Screen.DesktopTop+60 then
|
||||||
OffsetRect(NewBounds,0,60-NewBounds.Bottom);
|
OffsetRect(NewBounds,0,Screen.DesktopTop+60-NewBounds.Bottom);
|
||||||
if NewBounds.Left>Screen.DesktopWidth+Screen.DesktopLeft-60 then begin
|
if NewBounds.Left>Screen.DesktopWidth+Screen.DesktopLeft-60 then begin
|
||||||
i:=(Screen.DesktopWidth+Screen.DesktopLeft-60)-NewBounds.Left;
|
i:=(Screen.DesktopWidth+Screen.DesktopLeft-60)-NewBounds.Left;
|
||||||
NewBounds.Left := Screen.DesktopWidth+Screen.DesktopLeft-60;
|
NewBounds.Left := Screen.DesktopWidth+Screen.DesktopLeft-60;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user