From f294bdedcc849914859e25c7ed0738d004c86086 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 27 Dec 2020 19:05:43 +0100 Subject: [PATCH] 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. --- Libraries/LibGUI/IconView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGUI/IconView.cpp b/Libraries/LibGUI/IconView.cpp index 87d0563b6f..1d8a8c6b06 100644 --- a/Libraries/LibGUI/IconView.cpp +++ b/Libraries/LibGUI/IconView.cpp @@ -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)