mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: [STUDIO-3374] DropDown only show tooltip for ellipsize text
Change-Id: I719df15ff5f6601ecbadfb3f483c4a48a90523f4
This commit is contained in:
parent
63029c628a
commit
ff45fc536a
2 changed files with 4 additions and 2 deletions
|
@ -300,6 +300,8 @@ void DropDown::render(wxDC &dc)
|
||||||
if (!text_off && !text.IsEmpty()) {
|
if (!text_off && !text.IsEmpty()) {
|
||||||
wxSize tSize = dc.GetMultiLineTextExtent(text);
|
wxSize tSize = dc.GetMultiLineTextExtent(text);
|
||||||
if (pt.x + tSize.x > rcContent.GetRight()) {
|
if (pt.x + tSize.x > rcContent.GetRight()) {
|
||||||
|
if (i == hover_item)
|
||||||
|
SetToolTip(text);
|
||||||
text = wxControl::Ellipsize(text, dc, wxELLIPSIZE_END,
|
text = wxControl::Ellipsize(text, dc, wxELLIPSIZE_END,
|
||||||
rcContent.GetRight() - pt.x);
|
rcContent.GetRight() - pt.x);
|
||||||
}
|
}
|
||||||
|
@ -444,8 +446,7 @@ void DropDown::mouseMove(wxMouseEvent &event)
|
||||||
if (hover >= (int) texts.size()) hover = -1;
|
if (hover >= (int) texts.size()) hover = -1;
|
||||||
if (hover == hover_item) return;
|
if (hover == hover_item) return;
|
||||||
hover_item = hover;
|
hover_item = hover;
|
||||||
if (hover >= 0)
|
SetToolTip("");
|
||||||
SetToolTip(texts[hover]);
|
|
||||||
}
|
}
|
||||||
paintNow();
|
paintNow();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,7 @@ public:
|
||||||
profile->Release();
|
profile->Release();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
webView2_13->Release();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue