summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/TreeView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-09 11:53:29 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-09 12:02:07 +0100
commit9e60fc5006685d0e802788c7db592e3671f135a4 (patch)
tree48370d9ca97f0bc0a4be5907e24910899203ac37 /Libraries/LibGUI/TreeView.cpp
parent607c01fad10efadecc09ad4a3def8fa7fd0c1f1a (diff)
downloadserenity-9e60fc5006685d0e802788c7db592e3671f135a4.zip
LibGUI: Add visual indicators for accepted drags to view classes
All the view classes used in FileManager now indicate when they are ready to accept a drop by showing a rounded rectangle around the item.
Diffstat (limited to 'Libraries/LibGUI/TreeView.cpp')
-rw-r--r--Libraries/LibGUI/TreeView.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}