CtrlLib: DisplayPopup/TreeCtrl adjustments

This commit is contained in:
Mirek Fidler 2022-10-19 10:48:18 +02:00
parent dcc9b0a502
commit f484b64c19
2 changed files with 2 additions and 2 deletions

View file

@ -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());

View file

@ -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;