Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Hoo boy, we've really accumulated a lot of this stuff.
|
|
|
|
|
|
This replaces the hand-rolled string-based inheritance check tech.
|
|
Note that these are only used in debugging/test output so it's not
performance sensitive.
|
|
|
|
|
|
Both is_action() and is_window() can be answered by RTTI.
|
|
|
|
Now that we have RTTI in userspace, we can do away with all this manual
hackery and use dynamic_cast.
We keep the is<T> and downcast<T> helpers since they still provide good
readability improvements. Note that unlike dynamic_cast<T>, downcast<T>
does not fail in a recoverable way, but will assert if the object being
casted is not a T.
|
|
|
|
Remove Widget::find_child_by_name and Widget::find_descendant_by_name,
and convert all users to using the type-safer version in Core::Object.
|
|
These look a lot like the parallel functionality in GUI::Widget :).
These use dynamic_cast now, to make use of that RTTI we just added.
|
|
|
|
Passing `-1` wouldn't work, as these are passed to `sendfd()'.
Fixes #4706.
|
|
This removes pointless scrollbars in FilePicker which looks nice.
|
|
Use for_each_view_implementation() to avoid duplicating the setup code
for each subview.
|
|
|
|
When calling set_checked(true) on an exclusive button, we will now
transfer focus to the newly checked button if one of its now-unchecked
siblings had focus before.
This makes windows that place initial focus somewhere in a group of
radio buttons look nicer when they show up, since focus will be on
whichever radio button was pre-checked, which may not be the first one
in the group.
|
|
Making an AbstractButton exclusive means that we enforce that only one
of the exclusive buttons within the same parent widget can be checked
at a time.
RadioButton was doing exactly the same thing, except in a custom way.
So just remove the custom code and make it exclusive. :^)
|
|
Old font functionality has been moved into BitmapFont
and an abstract Font interface has been introduced to
faciliate further development of TTF font integration.
|
|
|
|
|
|
WavWriter::finalize didn't check that m_file was actually valid before
trying to seek and close it. The file is only set by set_file, so it's
not an invariant. Just add a null guard to finalize().
|
|
Because pthread_create will always call pthread_exit internally before
exiting the thread function, we can remove the odd requirement that the
user's thread function must call Thread::quit internally.
Make Thread::join clear m_tid on success, and print to stderr on
failure. Call join from ~Thread(). Now if you write an infinite loop in
your thread in an application and don't have an exit condition, you will
block in the thread's destructor forever. Time for stop_token? :)
|
|
Just constructing one of these guys on the stack willy nilly will leak
the first reference to them. There might be other C_OBJECTs that have
public constructors, seems like a good place for some static analysis
checks :).
Force users to call the construct() method for it.
|
|
Compared to version 10 this fixes a bunch of formatting issues, mostly
around structs/classes with attributes like [[gnu::packed]], and
incorrect insertion of spaces in parameter types ("T &"/"T &&").
I also removed a bunch of // clang-format off/on and FIXME comments that
are no longer relevant - on the other hand it tried to destroy a couple of
neatly formatted comments, so I had to add some as well.
|
|
Fixes #4668.
|
|
Fixes* 4668
|
|
|
|
The left and top highlight edges were cut off by the dialog frame.
Add a small margin to make sure all buttons can be painted fully.
|
|
GUI::Button has a default min-width of 32, so we have to override that
here in order to squeeze all the emojis into the window.
Fixes #4689.
|
|
This widgets offers a more visually intuitive way to adjust the opacity
of something.
|
|
|
|
|
|
We don't want to trigger an actual selection change until either
confirming the new selection by keyboard or clicking on it.
Dismissing the dropdown should have no effect on the current
selection.
Fixes #4657
|
|
We previously had a cached bold variant font in Gfx::Font that was very
haphazardly located by filename pattern. This patches replaces that
mechanism with a proper Gfx::FontDatabase lookup for the same font but
with bold weight (700).
|
|
|
|
Map font weights to their names from the OpenType specification.
|
|
We can reuse the same model, as long as we call update() on them when
the list of weights/sizes change.
|
|
Use Vector::find_first_index() instead of iterating manually. :^)
|
|
Since RefPtr<T> decrements the ref counter to 0 and after that starts
destructing the object, there is a window where the ref count is 0
and the weak references have not been revoked.
Also change WeakLink to be able to obtain a strong reference
concurrently and block revoking instead, which should happen a lot
less often.
Fixes a problem observed in #4621
|
|
Fixes #4671.
|
|
Make everything a bit smaller and hide the horizontal scrollbars in the
list views since we don't really need them.
|
|
When we have an abstract font class it makes no sense to keep
these methods in the Font class.
|
|
|