mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibGUI: Invalidate IconView cache on font change
Changing the font means we have to recalculate all the item rects etc.
This commit is contained in:
parent
ff0766056b
commit
dd607fc619
2 changed files with 9 additions and 0 deletions
|
@ -59,6 +59,12 @@ void IconView::resize_event(ResizeEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
void IconView::did_change_font()
|
||||
{
|
||||
AbstractView::did_change_font();
|
||||
rebuild_item_cache();
|
||||
}
|
||||
|
||||
void IconView::rebuild_item_cache() const
|
||||
{
|
||||
auto prev_item_count = m_item_data_cache.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue