summaryrefslogtreecommitdiff
path: root/Userland/Applications/ImageViewer
AgeCommit message (Collapse)Author
2022-01-12Base+Userland: Add various iconselectrikmilk
Add new icons to menus, add existing icons that could be used in menus.
2022-01-06LibGUI: Move rotate cw/ccw to CommonActionsMarcus Nilsson
The rotate clockwise/rotate counterclockwise actions can be added to CommonActions since they are repeated in FontEditor, ImageViewer and PixelPaint. This keeps the shortcuts and icons consistent across applications.
2022-01-06ImageViewer: Show error if wallpaper could not be setJunior Rantila
2022-01-06ImageViewer: TRY all the thingsJunior Rantila
2022-01-06LibCore+ImageViewer: Add unlink() wrapper, use itJunior Rantila
2021-12-29ImageViewer: Allow choice between nearest neighbor and bilinear scalingLuke Wilde
Currently, ImageViewer always uses nearest neighbor scaling. This allows the user to choose whether to use nearest neighbor or bilinear scaling. It current defaults to nearest neighbor.
2021-12-28ImageViewer: Change how scaling worksMaciej
- Store scale as a (float) factor (not as %) - Make scaling exponential so that matches PixelPaint and another image viewers/editors/etc
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-24LibDesktop: Make allowlist APIs return ErrorOr<void>Andreas Kling
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
2021-11-24ImageViewer: Port to LibMain :^)Andreas Kling
2021-11-23LibCore+AK: Move MappedFile from AK to LibCoreAndreas Kling
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::flipped()Andreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::rotated()Andreas Kling
2021-10-27Everywhere: Rename left/right-click to primary/secondaryFiliph Sandström
This resolves #10641.
2021-10-19ImageViewer: Use scaled image size when resizing window to fit itNícolas F. R. A. Prado
When the image is flipped or rotated, the window is resized to ensure that the image still fits in the frame. However, currently the original bitmap rect is used, which doesn't take into account the scaling factor. Fix this by using the scaled rect instead.
2021-09-13ImageViewer: Enable and disable navigationMohsan Ali
Before there was dialogs to indicate if current file is last or first. So in this commit, I added functionality to enable and disable forward and backward navigation based on if the next file is avialable or not and if the pervious file is avialable or not, respectively. ImageViewer: Refactor code and init data Data intialization was not happening properly, now I did Initializations properly so that navigation can work from the very first image.
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-09-04ImageViewer: Kindly ask the user if they want to delete a fileMusab Kılıç
2021-08-01Applications: Remove unused header includesBrian Gianforcaro
2021-07-27ImageViewer: Hide the border frame in fullscreen modeKarol Kosek
2021-07-21Userland: Add GUI::Window::add_menu() and use it everywhereAndreas Kling
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-20ImageViewer: Do not resize the window if the image fits into the windowAziz Berkay Yesilyurt
2021-07-20ImageViewer: Do not return early when the scale is not changedAziz Berkay Yesilyurt
When the image is rotated, the scale is still the same, but the window needs to be still resized.
2021-07-20ImageViewer: Use the same function to resize the windowAziz Berkay Yesilyurt
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-12ImageViewer: Activate window only on file dropKarol Kosek
2021-07-09ImageViewer: Use real path for the image pathAziz Berkay Yesilyurt
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-09ImageViewer: Use LexicalPath to grab current_dirAziz Berkay Yesilyurt
2021-07-09ImageViewer: Don't resize the window after the first image is displayedAziz Berkay Yesilyurt
2021-07-08Userland: Keep ImageViewer window size the same while zooming inAziz Berkay Yesilyurt
ImageViewer window kept growing while zooming in, which causes out of memory error and crashes the application. Now, only the image content is rescaled and the window size is preserved. We also open the display window as the same size as the image, which may cause a similar issue for very large image files. This is prevented by limiting the maximum window size to be the screen size.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-05-21Applications: Use titlecase and distinct underlined characters in menusMax Wipfli
This changes (context) menus across the system to conform to titlecase capitalization and to not underline the same character twice (for accessing actions with Alt).
2021-05-18LibGfx: Rename RotationDirection membersMatthew Olsson
Left => CounterClockwise Right => Clockwise Makes much more sense for a rotation
2021-05-16ImageViewer: Stop animation timer when deleting/changing imageDragonAlex98
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-16ImageViewer: Disable image actions when there is no imageDragonAlex98
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-15ImageViewer: Use GUI::CommonActions for zoom related actionsAndreas Kling
2021-05-14ImageViewer: Sandbox image decoding using the ImageDecoder service :^)Andreas Kling
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-14ImageViewer: Rename QSWidget => ImageViewer::ViewWidgetAndreas Kling
2021-05-14Userland: Rename QuickShow => Image ViewerAndreas Kling
The old name was a bit too ambiguous. This one is crystal clear. :^)