CtrlLib: TreeCtrl full info tips now fixed if there is addional Ctrl in the node

git-svn-id: svn://ultimatepp.org/upp/trunk@10354 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-10-24 11:50:31 +00:00
parent a2ec597ffa
commit f7fb6fba00

View file

@ -867,16 +867,17 @@ void TreeCtrl::SyncInfo()
if(IsShutdown() || IsPainting())
return;
if((HasMouse() || info.HasMouse()) && popupex) {
Size sz = GetSize();
Point p = GetMouseViewPos();
Point org = sb;
// if(p.y + org.y > sb.GetTotal().cy)
// return;
int i = FindLine(p.y + org.y);
if(i < line.GetCount()) {
Size sz = GetSize();
const Line& l = line[i];
const Item& m = item[l.itemi];
int x = levelcx + l.level * levelcx - org.x + m.image.GetSize().cx;
Size csz = m.GetCtrlSize();
if(m.ctrl && !highlight_ctrl)
x += csz.cx;
Rect r = RectC(x, l.y - org.y, sz.cx - x, m.GetSize(display).cy);
if(r.Contains(p)) {
Color fg, bg;