Commit graph

25 commits

Author SHA1 Message Date
Paulo Henrique Silva 0b3c1b4c79 Mandelbrot: Add Help menu with standard About action
Noticed that Mandelbrot didn't use the standard About action in the Help
menu. As a first patch to Serenity, this patch fixes it.
2022-03-08 18:34:14 +01:00
Dmitry Petrov 1662213737 Userland: Add horizontal mouse scroll support 2022-01-20 10:37:52 +01:00
Brian Gianforcaro cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
pbrw 601de466cb Mandelbrot: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
Andreas Kling 0de33b3d6c LibGfx: Use ErrorOr<T> for Bitmap::try_create()
Another one that was used in a fajillion places.
2021-11-08 00:35:27 +01:00
Andreas Kling 235f39e449 LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
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-08 00:35:27 +01:00
Ben Wiederhake 3796d417e0 Demos+DevTools+Games: Fix visibility of Object-derivative constructors
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-11-02 22:56:53 +01:00
Filiph Sandström d6a0726302 Everywhere: Rename left/right-click to primary/secondary
This resolves #10641.
2021-10-27 22:05:58 +03:00
Mustafa Quraish 1da081bf86 Mandelbrot: Use the new Zoom cursor
It makes it really clear now that you can use the mouse to zoom
when you see the zoom cursor.
2021-09-04 03:35:23 +02:00
Nico Weber 5c3440c5db Mandelbrot: Add a View menu with zoom actions 2021-08-14 19:50:44 +02:00
Nico Weber 19068945de Mandelbrot: Extract reset() method 2021-08-14 19:50:44 +02:00
Nico Weber ad7bfe017f Mandelbrot: Extract zoom() method 2021-08-14 19:50:44 +02:00
sin-ack 1be59d663a Mandelbrot: Only recalculate missing areas after panning
We can reuse the areas that we have from before and just recalculate
the areas that are fresh. This makes panning super smooth. :^)
2021-08-10 09:48:12 +02:00
sin-ack d28802ad22 Mandelbrot: Add panning
Adds the ability to use the middle-mouse click to pan the current view.
2021-08-10 09:48:12 +02:00
sin-ack faec8bbe45 Mandelbrot: Add mousewheel zooming
This allows the user to zoom in with a up scroll of the mousewheel and
zoom out with a down scroll.
2021-08-10 09:48:12 +02:00
sin-ack a08dd5b99c Mandelbrot: Use a GUI::Frame to paint into
This allows us to have a frame border which looks nicer.
2021-08-10 09:48:12 +02:00
Andreas Kling 687a12d7fb Userland: Add GUI::Window::add_menu() and use it everywhere
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-21 21:24:26 +02:00
Andreas Kling c7d891765c LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
Gunnar Beutner 631d36fd98 Everywhere: Add component declarations
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Gunnar Beutner 92879383fb Mandelbrot: Export images in a fixed resolution
This makes the exported image independent from the current window size
and just always exports it at 1920x1080.
2021-05-18 16:01:32 +02:00
Gunnar Beutner f2f728d39a Mandelbrot: Keep the aspect ratio when (re-)sizing the window
Previously the initial aspect ratio was incorrect and there was
nothing to ensure that the aspect ratio is kept when resizing the
window.
2021-05-18 16:01:32 +02:00
Gunnar Beutner 77bd3f75ce Mandelbrot: Add support for exporting the current image
Unfortunately this means unveil() won't work - at least until we get
something like FilePickerServer.
2021-05-18 16:01:32 +02:00
Gunnar Beutner b429ee88f8 Mandelbrot: Implement color smoothing with gradients
This removes the color banding that happens for some of the
"outer" areas which all have the same iteration count.
2021-05-18 16:01:32 +02:00
Gunnar Beutner c961616e6d Mandelbrot: Maintain aspect ratio when selecting a region
This makes sure the aspect ratio of the widget and the selection
match. Otherwise you'd end up with distorted images when zooming
in.
2021-05-18 16:01:32 +02:00
Gunnar Beutner 51db8085f8 Demos: Add Mandelbrot demo
This adds a very rudimentary Mandelbrot viewer. It supports zooming
and pretty much nothing else. Not even color smoothing or super
sampling.
2021-05-17 13:35:39 +02:00