mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlLib: Fixed DisplayPopup issue
This commit is contained in:
parent
ad84ba051f
commit
92b6299c9b
3 changed files with 10 additions and 4 deletions
|
|
@ -89,7 +89,9 @@ INITIALIZER(SSL)
|
|||
LLOG("SslInit");
|
||||
TcpSocketInit();
|
||||
#ifdef UPP_HEAP
|
||||
#ifndef _DEBUG // temporary solution unless we find the source of all those harmless leaks
|
||||
CRYPTO_set_mem_functions(SslAlloc, SslRealloc, SslFree);
|
||||
#endif
|
||||
#endif
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ DisplayPopup::PopUp::~PopUp()
|
|||
|
||||
Rect DisplayPopup::Check(Ctrl *ctrl, const Rect& item, const Value& value, const Display *display, int margin)
|
||||
{
|
||||
if(display && ctrl && !ctrl->IsDragAndDropTarget() && !(GetMouseLeft() || GetMouseRight() || GetMouseMiddle())) {
|
||||
if(display && ctrl && !ctrl->IsDragAndDropTarget()) {
|
||||
Ctrl *top = ctrl->GetTopCtrl();
|
||||
if(top && top->HasFocusDeep()) {
|
||||
Size sz = display->GetStdSize(value);
|
||||
|
|
@ -115,9 +115,8 @@ void DisplayPopup::PopUp::Sync()
|
|||
}
|
||||
|
||||
Rect r = Check(ctrl, item, value, display, margin);
|
||||
if(IsNull(r)) {
|
||||
if(IsNull(r))
|
||||
WhenClose();
|
||||
}
|
||||
else {
|
||||
Ctrl *top = ctrl->GetTopCtrl();
|
||||
Size sz = display->GetStdSize(value);
|
||||
|
|
|
|||
|
|
@ -986,14 +986,15 @@ void TreeCtrl::SyncInfo()
|
|||
Point org = sb;
|
||||
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];
|
||||
Size sz = GetSize();
|
||||
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.GetValueSize(display).cy + 2 * m.margin);
|
||||
// Rect r = GetValueRect(l);
|
||||
if(r.Contains(p)) {
|
||||
Color fg, bg;
|
||||
dword st;
|
||||
|
|
@ -1172,6 +1173,10 @@ void TreeCtrl::Paint(Draw& w)
|
|||
if(!IsNull(m.value) || m.ctrl && highlight_ctrl) {
|
||||
w.DrawRect(br, bg);
|
||||
Rect r = RectC(x + ctx + m.margin, y + (msz.cy - vsz.cy) / 2, vsz.cx, vsz.cy);
|
||||
if(st & Display::CURSOR) {
|
||||
DDUMP(r);
|
||||
DDUMP(GetValueRect(l));
|
||||
}
|
||||
w.Clip(r);
|
||||
d->Paint(w, r, m.value, fg, bg, st);
|
||||
w.End();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue