summaryrefslogtreecommitdiff
path: root/Userland/Applications/PDFViewer
AgeCommit message (Collapse)Author
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
2021-05-27PDFViewer: Show app name as "PDF Viewer" when a file is loadedLinus Groh
2021-05-25PDFViewer: Add a toolbarMatthew Olsson
The toolbar has an option to toggle the sidebar, a number input to set the current page, and two buttons to go up and down by one page
2021-05-25PDFViewer: Add a tab bar with outlines and thumbnailsMatthew Olsson
Outlines are in theory implemented (though I'm having trouble finding a simple PDF with outlines to test it on), and thumbnails are not.
2021-05-18PDFViewer: Ignore wheel events when there is no document loadedAndreas Kling
2021-05-18PDFViewer+Base: Display application title as "PDF Viewer"Andreas Kling
This matches other applications in the system. :^)
2021-05-18PDFViewer: Add some padding to the outside of the pageMatthew Olsson
2021-05-18PDFViewer: Allow zooming in and out + scrollingMatthew Olsson
When holding ctrl and scrolling, the page will be zoomed in an out. When zoomed in on a page, scrolling with move vertically up and down the page (or horizontally if shift is being held). In order to speed up zooming, zoomed bitmaps are cached per-page at each distinct zoom level. This cache is cleared every 30 seconds to prevent OOM problems.
2021-05-18LibPDF/PDFViewer: Support rotated pagesMatthew Olsson
2021-05-18Applications: Add a very simple PDFViewerMatthew Olsson