mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
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.
This commit is contained in:
parent
607c01fad1
commit
9e60fc5006
4 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue