diff options
-rw-r--r-- | Libraries/LibGUI/ColumnsView.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibGUI/IconView.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/TableView.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibGUI/TreeView.cpp | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/Libraries/LibGUI/ColumnsView.cpp b/Libraries/LibGUI/ColumnsView.cpp index 058217848e..e0c061a546 100644 --- a/Libraries/LibGUI/ColumnsView.cpp +++ b/Libraries/LibGUI/ColumnsView.cpp @@ -154,6 +154,10 @@ void ColumnsView::paint_event(PaintEvent& event) painter.draw_focus_rect(row_rect, palette().focus_outline()); } + if (has_pending_drop() && index == drop_candidate_index()) { + painter.draw_rect(row_rect, palette().selection(), true); + } + bool expandable = model()->row_count(index) > 0; if (expandable) { Gfx::IntRect arrow_rect = { diff --git a/Libraries/LibGUI/IconView.cpp b/Libraries/LibGUI/IconView.cpp index a034cc3f55..cfb0111329 100644 --- a/Libraries/LibGUI/IconView.cpp +++ b/Libraries/LibGUI/IconView.cpp @@ -561,7 +561,7 @@ void IconView::paint_event(PaintEvent& event) draw_item_text(painter, item_data.index, item_data.selected, item_data.text_rect, item_data.text, font, Gfx::TextAlignment::Center, Gfx::TextElision::Right); } - if (item_data.index == drop_candidate_index()) { + if (has_pending_drop() && item_data.index == drop_candidate_index()) { // FIXME: This visualization is not great, as it's also possible to drop things on the text label.. painter.draw_rect(item_data.icon_rect.inflated(8, 8), palette().selection(), true); } diff --git a/Libraries/LibGUI/TableView.cpp b/Libraries/LibGUI/TableView.cpp index 347dc1ae3b..af3bba352f 100644 --- a/Libraries/LibGUI/TableView.cpp +++ b/Libraries/LibGUI/TableView.cpp @@ -161,6 +161,10 @@ void TableView::paint_event(PaintEvent& event) painter.draw_rect(row_rect, widget_background_color); painter.draw_focus_rect(row_rect, palette().focus_outline()); } + + if (has_pending_drop() && selection_behavior() == SelectionBehavior::SelectRows && row_index == drop_candidate_index().row()) { + painter.draw_rect(row_rect, palette().selection(), true); + } ++painted_item_index; }; diff --git a/Libraries/LibGUI/TreeView.cpp b/Libraries/LibGUI/TreeView.cpp index 0ba87e5617..ca6455024f 100644 --- a/Libraries/LibGUI/TreeView.cpp +++ b/Libraries/LibGUI/TreeView.cpp @@ -378,6 +378,10 @@ void TreeView::paint_event(PaintEvent& event) else painter.blit(toggle_rect.location(), *m_expand_bitmap, m_expand_bitmap->rect()); } + + if (has_pending_drop() && index == drop_candidate_index()) { + painter.draw_rect(rect, palette().selection(), true); + } } x_offset += column_width + horizontal_padding() * 2; } |