Tooltips for the parameters labels on Settings tabs are back

This commit is contained in:
YuSanka 2020-11-21 18:15:20 +01:00
parent 641d27eef4
commit 2e0e63fed8

View File

@ -244,8 +244,10 @@ void OG_CustomCtrl::OnMotion(wxMouseEvent& event)
for (CtrlLine& line : ctrl_lines) { for (CtrlLine& line : ctrl_lines) {
line.is_focused = is_point_in_rect(pos, line.rect_label); line.is_focused = is_point_in_rect(pos, line.rect_label);
if (line.is_focused && !suppress_hyperlinks) { if (line.is_focused) {
tooltip = get_url(line.og_line.label_path); if (!suppress_hyperlinks && !line.og_line.label_path.empty())
tooltip = get_url(line.og_line.label_path) +"\n\n";
tooltip += line.og_line.label_tooltip;
break; break;
} }
@ -610,7 +612,7 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC& dc, wxPoint pos, const wxStr
dc.GetMultiLineTextExtent(out_text, &text_width, &text_height); dc.GetMultiLineTextExtent(out_text, &text_width, &text_height);
pos.y = pos.y + lround((height - text_height) / 2); pos.y = pos.y + lround((height - text_height) / 2);
if (width > 0 && is_url) if (width > 0)
rect_label = wxRect(pos, wxSize(text_width, text_height)); rect_label = wxRect(pos, wxSize(text_width, text_height));
wxColour old_clr = dc.GetTextForeground(); wxColour old_clr = dc.GetTextForeground();