mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: X11Top.cpp centering fix (thanks Klugier)
git-svn-id: svn://ultimatepp.org/upp/trunk@6299 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c41df4e80f
commit
f4afcd88be
1 changed files with 3 additions and 2 deletions
|
|
@ -238,8 +238,9 @@ void TopWindow::CenterRect(Ctrl *owner)
|
|||
else
|
||||
r = wr;
|
||||
Point p = r.CenterPos(sz);
|
||||
r = RectC(p.x, p.y, sz.cx, sz.cy);
|
||||
|
||||
if (p.x <= wr.Width() && p.y <= wr.Height()) {
|
||||
r = RectC(p.x, p.y, sz.cx, sz.cy);
|
||||
wr.left += fm.left;
|
||||
wr.right -= fm.right;
|
||||
wr.top += fm.top;
|
||||
|
|
@ -252,8 +253,8 @@ void TopWindow::CenterRect(Ctrl *owner)
|
|||
r.bottom = wr.bottom;
|
||||
minsize.cx = min(minsize.cx, r.GetWidth());
|
||||
minsize.cy = min(minsize.cy, r.GetHeight());
|
||||
SetRect(r);
|
||||
}
|
||||
SetRect(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue