diff --git a/uppsrc/CtrlLib/DisplayPopup.cpp b/uppsrc/CtrlLib/DisplayPopup.cpp index 6e266bb9c..d9104878f 100644 --- a/uppsrc/CtrlLib/DisplayPopup.cpp +++ b/uppsrc/CtrlLib/DisplayPopup.cpp @@ -106,7 +106,7 @@ void DisplayPopup::PopUp::Sync() if(slim.Contains(GetMousePos())) { Rect r = item; r.right = max(r.right, r.left + sz.cx + 2 * margin); - r.bottom = max(r.bottom, r.top + sz.cy + 2 * margin); + r.bottom = max(r.bottom, r.top + sz.cy); r.Inflate(1, 1); Rect v = ctrl->GetScreenView(); r.Offset(v.TopLeft()); diff --git a/uppsrc/CtrlLib/TreeCtrl.cpp b/uppsrc/CtrlLib/TreeCtrl.cpp index 9a6579125..f15149fd1 100644 --- a/uppsrc/CtrlLib/TreeCtrl.cpp +++ b/uppsrc/CtrlLib/TreeCtrl.cpp @@ -982,7 +982,7 @@ void TreeCtrl::SyncInfo() Size csz = m.GetCtrlSize(); if(m.ctrl && !highlight_ctrl) x += csz.cx; - Rect r = RectC(x, l.y - org.y, sz.cx - x, m.GetValueSize(display).cy); + Rect r = RectC(x, l.y - org.y, sz.cx - x, m.GetValueSize(display).cy + 2 * m.margin); if(r.Contains(p)) { Color fg, bg; dword st;