FileManager: Add an animation for deleting files
This commit is contained in:
parent
e53117a9b9
commit
cdcf097aa8
Notes:
sideshowbarker
2024-07-17 19:45:59 +09:00
Author: https://github.com/jswartzendruber 🔰 Commit: https://github.com/SerenityOS/serenity/commit/cdcf097aa86 Pull-request: https://github.com/SerenityOS/serenity/pull/12301 Issue: https://github.com/SerenityOS/serenity/issues/8930 Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 9 additions and 2 deletions
BIN
Base/res/icons/32x32/recycle-bin.png
Normal file
BIN
Base/res/icons/32x32/recycle-bin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1,012 B |
|
@ -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
Reference in a new issue