fix: tooltip window doesn't have tree scheme & typeface (issue #405)

The treebox tooltip window is not initialized with the treebox scheme, which causes a crash in color_proxy::operator color(). Additionally, the tooltip window also uses a default font.
This commit is contained in:
ErrorFlynn 2019-03-12 15:58:01 -04:00 committed by GitHub
parent 40085f24cc
commit 68d01ffe70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -963,6 +963,8 @@ namespace nana
if(text_r.right() > visible_w_pixels())
{
node_state.tooltip = new tooltip_window(data.widget_ptr->handle(), text_r);
API::dev::set_scheme(node_state.tooltip->handle(), API::dev::get_scheme(data.widget_ptr->handle()));
node_state.tooltip->typeface(data.widget_ptr->typeface());
node_attribute node_attr;
assign_node_attr(node_attr, node_state.pointed);