Commit graph

9 commits

Author SHA1 Message Date
Aziz Berkay Yesilyurt
41ebb12c9e ImageViewer: Do not resize the window if the image fits into the window 2021-07-20 23:40:26 +02:00
Aziz Berkay Yesilyurt
63e78ccd9f ImageViewer: Do not return early when the scale is not changed
When the image is rotated, the scale is still the same, but the window
needs to be still resized.
2021-07-20 23:40:26 +02:00
Aziz Berkay Yesilyurt
285d4fac38 ImageViewer: Use the same function to resize the window
ImageViewer used two different logic to resize the display window, which
leads to confusing behaviour for rotate function. Now all the resizing
behaviour goes through the existing resize_window function.
2021-07-20 23:40:26 +02:00
Aziz Berkay Yesilyurt
ec389adaa6 ImageViewer: Use real path for the image path
By using the real path for the image, ImageViewer can iterate over the
images in the same directory. Before, this was not possible when
ImageViewer opened from Terminal with a path argument.
2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
f62f53f723 ImageViewer: Use LexicalPath to grab current_dir 2021-07-09 10:22:26 +02:00
DragonAlex98
47ec5cf340 ImageViewer: Stop animation timer when deleting/changing image
Previously deleting an animated image wouldn't make the animation timer
stop. This resulted in the animation still running in the ViewWidget.

Moreover the timer wasn't stopped when loading different images, which
led to high CPU usage when going from an animated image to a
non-animated one.
2021-05-16 16:22:21 +01:00
DragonAlex98
bce119036a 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.
2021-05-16 16:22:21 +01:00
Andreas Kling
212e1ba0d4 ImageViewer: Sandbox image decoding using the ImageDecoder service :^)
Instead of parsing untrusted and potentially malicious image files in
the ImageViewer GUI process, take advantage of the ImageDecoder service
that we already have on the system to sandbox the decode.

This prevents bugs in our image decoding libraries from being used as
an exploitation vector when viewing files in ImageViewer.
2021-05-14 21:02:18 +02:00
Andreas Kling
3168a4afe8 ImageViewer: Rename QSWidget => ImageViewer::ViewWidget 2021-05-14 18:37:08 +02:00
Renamed from Userland/Applications/ImageViewer/QSWidget.cpp (Browse further)