Age | Commit message (Collapse) | Author |
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
Prevents ScrollableContainerWidgets from moving when changing
values in embedded widgets with the mouse wheel.
|
|
|
|
When the value for a SpinBox equals the max, disable the increment
button. Functionally, clicking the button doesn't do anything because
the set_value() clamps the value to min/max and updates the textbox.
However it is still nice to indicate to the user that they've reached
the max. Same goes for minimum value and the decrement button.
|
|
Previously the value of the SpinBox is re-evaluated after every change
to the TextBox control. This leads to very unintuitive behavior such as
the user deleting the contents of the box and it having no
visible effect. This happens because the TextBox no longer has a valid
number and so gets reset to the current m_value of the SpinBox.
By defering the update of to the SpinBox value until focus leaves the
control we provide a much more intuitive experience with the text box.
We do still validate when a user types something that it parses to an
int. If it does not we delete the most recent character. This in effect
prevents non-numeric numbers from being entered.
Upon losing focus the value will be checked. If empty we set the SpinBox
value to the minimum allowed value.
|
|
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.
|
|
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
Crash was caused by deferred invocation of a lambda on the SpinBox's
TextEditor widget's on_change. The lambda referenced the SpinBox ptr,
but in GML Playground the SpinBox was free'd before the deferred
lambda could run, causing a use-after-free error. Fixed by using
a weak ptr to detect if the SpinBox was free'd.
|
|
|
|
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
|
|
This is a helpful option to prevent unwanted side effects, distinguish
between user and programmatic input, etc. Sliders and SpinBoxes were
implementing it idiosyncratically, so let's generalize the API and
give Buttons and TextEditors the same ability.
|
|
These suffered the same visual defect as scrollbars when styled
as normal buttons: against backgrounds with the same color as
their highlighting, aspect was lost.
|
|
Also mark them as [[nodiscard]].
|
|
Pass false to set_range to avoid on_change side-effects.
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
Prevents discrete values from being skipped when using the mouse
wheel on SpinBoxes and proportional Sliders. Wheel delta can be
accelerated by holding Ctrl.
|
|
ComboBoxes and SpinBoxes were still relying on ascii-to-bitmap
icons instead of PNGs. This makes it easier to theme in the future.
|
|
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
|
|
|