mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 06:38:22 +00:00
ImageViewer: Disable image actions when there is no image
Previously some actions like Rotate/Flip/Set as Desktop Wallpaper would make the application crash if no image was loaded. Now image actions are enabled/disabled based on whether an image has been loaded or not.
This commit is contained in:
parent
400d3ddb08
commit
bce119036a
Notes:
sideshowbarker
2024-07-18 18:02:15 +09:00
Author: https://github.com/DragonAlex98
Commit: bce119036a
Pull-request: https://github.com/SerenityOS/serenity/pull/7168
Reviewed-by: https://github.com/linusg
3 changed files with 29 additions and 2 deletions
|
@ -42,6 +42,7 @@ public:
|
|||
Function<void(int, Gfx::IntRect)> on_scale_change;
|
||||
Function<void()> on_doubleclick;
|
||||
Function<void(const GUI::DropEvent&)> on_drop;
|
||||
Function<void(const Gfx::Bitmap*)> on_image_change;
|
||||
|
||||
private:
|
||||
ViewWidget();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue