From 9225bfa95e354dc12c6705d65ff33224095a8917 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 28 Sep 2020 12:27:56 +0200 Subject: [PATCH] LibGUI: Correct inline editor placement in ColumnsView Thanks to @bugaevc for noticing that I didn't account for the 1px space between columns, and for the space occupied by the item icon. --- Libraries/LibGUI/ColumnsView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibGUI/ColumnsView.cpp b/Libraries/LibGUI/ColumnsView.cpp index b624f3761a..780ec69feb 100644 --- a/Libraries/LibGUI/ColumnsView.cpp +++ b/Libraries/LibGUI/ColumnsView.cpp @@ -323,8 +323,8 @@ Gfx::IntRect ColumnsView::content_rect(const ModelIndex& index) const int column_x = 0; for (auto& column : m_columns) { if (column.parent_index == index.parent()) - return { column_x, index.row() * item_height(), column.width, item_height() }; - column_x += column.width; + return { column_x + icon_size(), index.row() * item_height(), column.width - icon_size(), item_height() }; + column_x += column.width + 1; } return {};