summaryrefslogtreecommitdiff
path: root/Userland/Applications/PDFViewer
AgeCommit message (Collapse)Author
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner
2022-04-04PDFViewer: Propagate more errorsMatthew Olsson
2022-04-04PDFViewer: Autosize page labelMatthew Olsson
2022-04-04PDFViewer: Respect page navigation features in multi-page modeMatthew Olsson
This includes the text box and the page up/down arrows.
2022-04-04PDFViewer: Support a continuous page view modeMatthew Olsson
2022-04-04PDFViewer: Add page mode optionMatthew Olsson
2022-04-04PDFViewer: Don't change pages on horizontal scrollMatthew Olsson
This was a bit jarring, and didn't align with the behavior of other PDF renderers.
2022-04-04PDFViewer: Clear rendered page cache on application resizeMatthew Olsson
When resizing the application, the pages are expected to grow or shrink proportionally. This means that after a resize, we need to rerender every page.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-31LibPDF: Fix security-handler-related nullptr regressionMatthew Olsson
2022-03-31PDFViewer: Use ArgsParserMatthew Olsson
2022-03-29LibPDF: Add implementation of the Standard security handlerMatthew Olsson
Security handlers manage encryption and decription of PDF files. The standard security handler uses RC4/MD5 to perform its crypto (AES as well, but that is not yet implemented).
2022-03-07LibPDF: Propagate errors in Renderer/PDFViewerMatthew Olsson
2022-03-07LibPDF: Propagate errors in Parser and DocumentMatthew Olsson
2022-02-28Applications: Change static constexpr variables to constexprLenny Maiorani
Function-local `static constexpr` variables can be `constexpr`. This can reduce memory consumption, binary size, and offer additional compiler optimizations.
2022-01-20PDFViewer: Use FileSystemAccessClient::try_* APIsMustafa Quraish
2022-01-20Userland: Add horizontal mouse scroll supportDmitry Petrov
2022-01-09PDFViewer: Propagate errors using try_set_main_widget in maincreator1creeper1
2022-01-06PDFViewer: Add actions to rotate the displayed PDFMarcus Nilsson
This implements the rotate cw/ccw actions in PDFViewer. Since the rendered pages are stored in a HashMap for caching, the bitmap is wrapped in a struct with the current rotation. This way the caching works as expected while zooming, and a new bitmap is rendered when the page is rotated.
2022-01-06PDFViewer: Enable panning with middle mouse buttonMarcus Nilsson
Enable the use of the middle mouse button for panning in PDFViewer.
2022-01-06PDFViewer: Add zoom in/out/reset menu actionsMarcus Nilsson
Make PDFViewer::zoom_in() & ::zoom_out() public and add menu and toolbar actions. Also add an action for zoom reset.
2022-01-06PDFViewer: Fix sidebar toggle logicMarcus Nilsson
The open_outline_action logic was backwards resulting in it being closed on the first click and opened on the second, and opposite if document->outline() was true. There was also a collision with the Ctrl+O shortcut for opening a document, this changes it to Ctrl+S instead. This commit also changes the wording to 'Toogle' instead of 'Open/Close' since the text wasn't updated as expected, and lastly, add a View menu with the action.
2021-12-30Everywhere: Use 'decrease_slider_by()' method from AbstractSliderElyse
The same idea as 'increase_slider_by()', it helps us to avoid repeating the pattern 'set_value(value() - delta)'.
2021-12-30Everywhere: Use 'increase_slider_by()' method from AbstractSliderElyse
This method help us to avoid repeating the pattern 'set_value(value() + delta)'.
2021-12-25PDFViewer: Add a basic set of pledgesAndreas Kling
2021-11-23LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCoreAndreas Kling
With this change, System::foo() becomes Core::System::foo(). Since LibCore builds on other systems than SerenityOS, we now have to make sure that wrappers work with just a standard C library underneath.
2021-11-22Everywhere: Use Application::construct() with Main::Arguments directlyMustafa Quraish
Use the updated API everywhere we are currently manually passing in `arguments.argc` and `arguments.argv`.
2021-11-22PDFViewer: Port to LibMainPascal Puffke
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
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::rotated()Andreas Kling
2021-11-02Applications: Fix visibility of Object-derivative constructorsBen Wiederhake
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
2021-09-13Everywhere: Use my fancy new serenityos.org email :^)Mustafa Quraish
2021-09-10PDFViewer: Open CLI files through FileSystemAccessServer without promptMustafa Quraish
Use `request_file_read_only_approved()` for the file (if any) is specified through a command line argument.
2021-09-04PDFViewer: Use FileSystemAccessClient to open filesMustafa Quraish
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-06Everywhere: Replace Model::update() with Model::invalidate()sin-ack
Most of the models were just calling did_update anyway, which is pointless since it can be unified to the base Model class. Instead, code calling update() will now call invalidate(), which functions identically and is more obvious in what it does. Additionally, a default implementation is provided, which removes the need to add empty implementations of update() for each model subclass. Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
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-06-22PDFViewer: Update the page number when scrolling between pagesFalseHonesty
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-06-12PDFViewer: Switch back to up/down page iconsMatthew Olsson
This time I remembered to actually commit the image files, oops :^)
2021-06-12PDFViewer: Display error dialog if necessary instead of crashingMatthew Olsson
2021-06-12LibPDF: Harden the document/parser against errorsMatthew Olsson
2021-05-27PDFViewer: Reset current page number to 1 when opening a fileLinus Groh
Also use set_current_number() instead of set_text(), so we don't have to create a string from the number ourselves.
2021-05-27PDFViewer: Enable previous/next buttons conditionallyLinus Groh
Instead of having both always enabled once a document is loaded, update them on each page change and disable if appropriate.
2021-05-27PDFViewer: Fix previous/next page toolbar button iconsLinus Groh
go-up.png and go-down.png don't exist (and would look silly here, with the buttons being next to each other horizontally). Use go-back.png and go-forward.png instead.
2021-05-27PDFViewer: Add a Help menuLinus Groh
2021-05-27PDFViewer: Add separator before quit menu actionLinus Groh