mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
FileManager: Add an animation for deleting files
This commit is contained in:
parent
e53117a9b9
commit
cdcf097aa8
2 changed files with 9 additions and 2 deletions
|
@ -26,7 +26,6 @@ FileOperationProgressWidget::FileOperationProgressWidget(FileOperation operation
|
|||
|
||||
auto& button = *find_descendant_of_type_named<GUI::Button>("button");
|
||||
|
||||
// FIXME: Show a different animation for deletions
|
||||
auto& file_copy_animation = *find_descendant_of_type_named<GUI::ImageWidget>("file_copy_animation");
|
||||
file_copy_animation.load_from_file("/res/graphics/file-flying-animation.gif");
|
||||
file_copy_animation.animate();
|
||||
|
@ -35,7 +34,15 @@ FileOperationProgressWidget::FileOperationProgressWidget(FileOperation operation
|
|||
source_folder_icon.load_from_file("/res/icons/32x32/filetype-folder-open.png");
|
||||
|
||||
auto& destination_folder_icon = *find_descendant_of_type_named<GUI::ImageWidget>("destination_folder_icon");
|
||||
destination_folder_icon.load_from_file("/res/icons/32x32/filetype-folder-open.png");
|
||||
|
||||
switch (m_operation) {
|
||||
case FileOperation::Delete:
|
||||
destination_folder_icon.load_from_file("/res/icons/32x32/recycle-bin.png");
|
||||
break;
|
||||
default:
|
||||
destination_folder_icon.load_from_file("/res/icons/32x32/filetype-folder-open.png");
|
||||
break;
|
||||
}
|
||||
|
||||
button.on_click = [this](auto) {
|
||||
close_pipe();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue