Age | Commit message (Collapse) | Author |
|
We can reuse the areas that we have from before and just recalculate
the areas that are fresh. This makes panning super smooth. :^)
|
|
Adds the ability to use the middle-mouse click to pan the current view.
|
|
This allows the user to zoom in with a up scroll of the mousewheel and
zoom out with a down scroll.
|
|
This allows us to have a frame border which looks nicer.
|
|
These functions reload the whole model contents and thus can be moved to
invalidate(), which saves us from the need to manually call update() on
them.
|
|
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>
|
|
Application::quit() is nicer for most cases where exit() is used. Cases
where exit() is used intentionally for early termination are left
intact.
|
|
|
|
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. :^)
|
|
Also mark them as [[nodiscard]].
|
|
AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.
Also clean up some stale math includes and improper floatingpoint usage.
|
|
This is needed to use the file picker dialog.
|
|
|
|
Previously, in LibGFX's `Point` class, calculated distances were passed
to the integer `abs` function, even if the stored type was a float. This
caused the value to unexpectedly be truncated. Luckily, this API was not
used with floating point types, but that can change in the future, so
why not fix it now :^)
Since we are in C++, we can use function overloading to make things
easy, and to automatically use the right version.
This is even better than the LibC/LibM functions, as using a bit of
hackery, they are able to be constant-evaluated. They use compiler
intrinsics, so they do not depend on external code and the compiler can
emit the most optimized code by default.
Since we aren't using the C++ standard library's trick of importing
everything into the `AK` namespace, this `abs` function cannot be
exported to the global namespace, as the names would clash.
|
|
|
|
The only remaining sync call from client to server is now the call
that switches a window's backing store. That one actually relies on
the synchronization to hand over ownership of the backing stores,
so it has to stay synchronous for now.
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
Enable cat dog to greet you, and help you with yak shave sessions.
|
|
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
|
|
|
|
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a.
Booting the system no longer worked after these changes.
|
|
Problem:
- `static` variables consume memory and sometimes are less
optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
every time the function is run.
Solution:
- If a global `static` variable is only used in a single function then
move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
`constexpr`.
|
|
|
|
Ask for a bold_variant() of the default_fixed_width_font() instead.
|
|
Instead use default_font().bold_variant() in cases where we want a bold
variant of the default font. :^)
|
|
The context menu for CatDog was shown when right clicking anywhere on
the screen because of global cursor tracking being enabled.
Also fix event not being passed by reference.
Fixes #7285
|
|
Also changes the category to `Graphics`
|
|
Having a help menu maintains better consistency with the other GUI apps
on the system.
|
|
- If the 3D file contains no vertices then an error is raised
- If the file is not an OBJ file then an error is raised
|
|
This change makes it possible for the GLTeapot demo to open any OBJ
file.
|
|
There was no way to close catdog since it relied on global menus, this
adds a context menu for opening the about dialog and quitting.
Fixes #7252
|
|
This makes the exported image independent from the current window size
and just always exports it at 1920x1080.
|
|
Previously the initial aspect ratio was incorrect and there was
nothing to ensure that the aspect ratio is kept when resizing the
window.
|
|
Unfortunately this means unveil() won't work - at least until we get
something like FilePickerServer.
|
|
This removes the color banding that happens for some of the
"outer" areas which all have the same iteration count.
|
|
This makes sure the aspect ratio of the widget and the selection
match. Otherwise you'd end up with distorted images when zooming
in.
|
|
This adds a very rudimentary Mandelbrot viewer. It supports zooming
and pretty much nothing else. Not even color smoothing or super
sampling.
|
|
If the OBJ loader encounters a file with vertex normals or texture
coordinates then it will no longer crash.
|
|
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
|
|
Matrix4x4 was defined as a derived class of Matrix<N,T> before.
Furthermore, some code was duplicated and it was overall just messy.
This commit turns Matrix4x4 into a simple alias for Matrix<4,T>.
|
|
Matrix elements were interpreted in different ways.
This makes it definitely row-major, allowing initialization via
initializer list in a standard scientific order. Also matrix
multiplication now happens in the correct order and accessing
elements happens as m_elements[row][column].
|
|
Not sure why some menus did have one and others didn't, even in the
same application - now they all do. :^)
I added character shortcuts to some menu actions as well.
|
|
These were missed in 4b0098e.
|
|
...and make it an enum class so people don't omit "OpenMode".
|
|
|
|
The teapot now looks more realistic
|
|
Improved the basic Wavefront OBJ loader to index vertices.
Uses less memory for the same mesh.
|
|
|
|
This adds helpful speech bubbles to CatDog. CatDog just wants to
help, that's all.
|
|
|