mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 01:42:54 +00:00
LibGUI: separate file names with commas in the drag operation text
This commit is contained in:
parent
8ddd053c2a
commit
e0c959ea7f
Notes:
sideshowbarker
2024-07-19 10:16:06 +09:00
Author: https://github.com/DAlperin 🔰
Commit: e0c959ea7f
Pull-request: https://github.com/SerenityOS/serenity/pull/1032
Reviewed-by: https://github.com/awesomekling
1 changed files with 6 additions and 1 deletions
|
@ -184,10 +184,15 @@ void GItemView::mousemove_event(GMouseEvent& event)
|
|||
|
||||
StringBuilder text_builder;
|
||||
StringBuilder data_builder;
|
||||
int index_iterations = 0;
|
||||
selection().for_each_index([&](auto& index) {
|
||||
index_iterations++;
|
||||
auto text_data = model()->data(index);
|
||||
if (index_iterations == 0)
|
||||
text_builder.append(" ");
|
||||
text_builder.append(text_data.to_string());
|
||||
text_builder.append(" ");
|
||||
if (!(index_iterations == selection().size()))
|
||||
text_builder.append(", ");
|
||||
|
||||
auto drag_data = model()->data(index, GModel::Role::DragData);
|
||||
data_builder.append(drag_data.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue