demostanis
34acae90c7
Userland: Let applications make use of make_command_palette_action()
2022-10-25 10:21:18 +01:00
thankyouverycool
f833473df0
Apps+Demos+Dialogs: Remove unnecessary minimum window sizes
...
The new layout system conveniently calculates these for us now.
In the case of Mandelbrot where it needs to be overriden, make
sure to disable obey min widget size first. In EmojiInputDialog's
case, the window needs to be resized instead to center correctly.
2022-08-25 13:28:50 +02:00
sin-ack
3f3f45580a
Everywhere: Add sv suffix to strings relying on StringView(char const*)
...
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-07-12 23:11:35 +02:00
EWouters
053fc51b7d
Mandelbrot: Remove image export confirmation dialog
...
Andreas mentioned this dialog is not needed in the monthly update
video[^1].
[^1]: https://youtu.be/yUmHEYs5n34?t=364
2022-05-08 16:38:19 +02:00
EWouters
d3bc3da873
Mandelbrot: Add BMP and QOI image formats as options for export
...
Inspired by #13558 I added the option to export as QOI to the
Mandelbrot demo. I added BMP as well for completeness.
2022-04-20 08:19:25 -04:00
Idan Horowitz
086969277e
Everywhere: Run clang-format
2022-04-01 21:24:45 +01:00
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
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