mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Large DisplayPopup issues behaviour improved
git-svn-id: svn://ultimatepp.org/upp/trunk@8894 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dec9c910ec
commit
22b924c8fe
1 changed files with 8 additions and 3 deletions
|
|
@ -548,7 +548,8 @@ void DisplayPopup::Sync()
|
|||
r.right = max(r.right, r.left + sz.cx + 2 * margin);
|
||||
r.bottom = max(r.bottom, r.top + sz.cy);
|
||||
r.Inflate(1, 1);
|
||||
r.Offset(ctrl->GetScreenView().TopLeft());
|
||||
Rect v = ctrl->GetScreenView();
|
||||
r.Offset(v.TopLeft());
|
||||
|
||||
Rect wa = GetWorkArea(r.BottomLeft());
|
||||
Size sz = r.GetSize();
|
||||
|
|
@ -567,8 +568,12 @@ void DisplayPopup::Sync()
|
|||
}
|
||||
else
|
||||
if(r.bottom > wa.bottom) {
|
||||
r.top = max(wa.top, wa.bottom - sz.cy);
|
||||
r.bottom = wa.bottom;
|
||||
if(wa.bottom - r.top < r.top - wa.top) { // there is more space upside
|
||||
r.bottom = item.bottom + v.top;
|
||||
r.top = max(wa.top, r.bottom - sz.cy);
|
||||
}
|
||||
else
|
||||
r.bottom = wa.bottom;
|
||||
}
|
||||
|
||||
SetRect(r);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue