fix bug that widgets may not draw correctly
This commit is contained in:
parent
40a6584a75
commit
5a4edd2fef
@ -950,6 +950,19 @@ namespace detail
|
|||||||
if (wd->dimension == sz)
|
if (wd->dimension == sz)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
std::vector<core_window_t*> presence;
|
||||||
|
|
||||||
|
if (wd->dimension.width < sz.width || wd->dimension.height < sz.height)
|
||||||
|
{
|
||||||
|
auto wd_r = rectangle{ wd->dimension };
|
||||||
|
for (auto child : wd->children)
|
||||||
|
{
|
||||||
|
auto child_r = rectangle{ child->pos_owner, child->dimension };
|
||||||
|
if (!overlapped(wd_r, child_r))
|
||||||
|
presence.push_back(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Before resiz the window, creates the new graphics
|
//Before resiz the window, creates the new graphics
|
||||||
paint::graphics graph;
|
paint::graphics graph;
|
||||||
paint::graphics root_graph;
|
paint::graphics root_graph;
|
||||||
@ -1010,6 +1023,11 @@ namespace detail
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto child : presence)
|
||||||
|
{
|
||||||
|
refresh_tree(child);
|
||||||
|
}
|
||||||
|
|
||||||
arg_resized arg;
|
arg_resized arg;
|
||||||
arg.window_handle = reinterpret_cast<window>(wd);
|
arg.window_handle = reinterpret_cast<window>(wd);
|
||||||
arg.width = sz.width;
|
arg.width = sz.width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user