1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

FileManager: Show an open folder icon for the selected directory

The currently selected directory now displays an open folder icon
in the directory tree.
This commit is contained in:
thankyouverycool 2020-07-10 09:51:15 -04:00 committed by Andreas Kling
parent e6ddc7e022
commit deceb91c48
3 changed files with 36 additions and 0 deletions

View file

@ -805,6 +805,14 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
}
};
tree_view.on_selection = [&](const GUI::ModelIndex& index) {
if (directories_model->m_previously_selected_index.is_valid())
directories_model->update_node_on_selection(directories_model->m_previously_selected_index, false);
directories_model->update_node_on_selection(index, true);
directories_model->m_previously_selected_index = index;
};
tree_view.on_selection_change = [&] {
if (tree_view.selection().is_empty())
return;