1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibGUI: Make IconView return a larger content rect for editing

This fixes a visual glitch where editing the name of an item in an
IconView would cut off the edited text.
This commit is contained in:
Andreas Kling 2020-12-27 19:05:43 +01:00
parent 04f1f74b85
commit f294bdedcc

View file

@ -417,7 +417,7 @@ Gfx::IntRect IconView::content_rect(const ModelIndex& index) const
if (!index.is_valid())
return {};
auto& item_data = get_item_data(index.row());
return item_data.text_rect;
return item_data.text_rect.inflated(4, 4);
}
void IconView::did_change_hovered_index(const ModelIndex& old_index, const ModelIndex& new_index)