Tim Ledbetter
f34b1c7a7e
PixelPaint: Make tool properties widget construction non-fallible
...
`Tool::get_properties_widget()` now also returns a NNRP to a widget
rather than a raw pointer.
2023-09-25 10:58:31 +02:00
Tim Ledbetter
b4e134cb52
Userland: Use non-fallible EventReceiver::add()
where possible
2023-09-25 10:58:31 +02:00
Tim Ledbetter
a6f6a1afd2
Userland: Prefer non-fallible construction for LibGUI objects
2023-09-18 18:00:45 +02:00
Andreas Kling
545d8336b8
LibGfx: Convert Font APIs to return String instead of DeprecatedString
2023-09-06 11:29:03 -04:00
Andreas Kling
8322b31b97
LibGUI: Remove Widget::try_set_layout<T>()
...
And fall back to the infallible set_layout<T>().
Work towards #20557 .
2023-08-14 14:57:54 +02:00
Andreas Kling
34344120f2
AK: Make "foo"_string infallible
...
Stop worrying about tiny OOMs.
Work towards #20405 .
2023-08-07 16:03:27 +02:00
thankyouverycool
91bafc2653
LibGUI+Userland: Port Labels to String
2023-04-30 05:48:14 +02:00
Andreas Kling
8a48246ed1
Everywhere: Stop using NonnullRefPtrVector
...
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06 23:46:35 +01:00
Linus Groh
09d40bfbb2
Everywhere: Use _{short_,}string to create Strings from literals
2023-02-25 20:51:49 +01:00
Andreas Kling
df07416171
PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const>
2023-02-21 00:54:04 +01:00
Tim Ledbetter
3d9ba87077
PixelPaint: Enable more text tool keyboard shortcuts
...
This commit allows the text tool's internal TextEditor component to
handle keyboard shortcuts that would normally be handled by menu
actions.
The shortcuts that can now be used are: cut, copy, paste, undo, redo
and select all.
2023-02-19 01:48:14 +01:00
Karol Kosek
be717edd33
PixelPaint: Propagate errors from making tool property widgets
2023-02-16 23:36:58 +00:00
Karol Kosek
d27d19f012
PixelPaint: Set Tool on_*_color_change logic using virtual functions
...
Previously, we were rewriting the on_primary_color_change in the Text
Tool and Gradient, which made the palette widget no longer update after
picking a color from an image. Additionally, it also crashed the program
after leaving the Gradient tool and trying to change color.
2023-02-16 10:50:58 +00:00
Karol Kosek
e39adc4772
Userland: Set Button text using the new String class
2023-02-13 00:45:09 +00:00
Tim Ledbetter
d4cb089acb
PixelPaint: Update text tool font color on primary color change
2023-02-02 14:41:59 +01:00
Tim Schumacher
82a152b696
LibGfx: Remove try_
prefix from bitmap creation functions
...
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Sam Atkins
e181b1cb82
Userland: Use Core::Timer::create_foo() factory functions where possible
2023-01-12 11:25:51 +01:00
Andreas Kling
2a61d66b0a
LibGfx: Make Font::preferred_line_height() more correct
...
Return a float, and fix a bogus calculation of ascender + descender.
2023-01-06 12:02:20 +01:00
MacDue
a1726b1ba5
LibGfx: Avoid rounding/truncating glyph positions till blitting
...
This keeps some overloads that accept ints to avoid adding calls to
.to_type<float>() all over the place.
2023-01-05 12:09:35 +01:00
Andreas Kling
3407ab0fd1
LibGfx: Make Font::width() return a float
2023-01-03 15:25:02 +01:00
Ben Wiederhake
b83cb09db1
Everywhere: Fix badly-formatted includes
...
In 7c5e30daaa
, the focus was "only" on
Userland/Libraries/, whereas this commit cleans up the remaining
headers in the repo, and any new badly-formatted include.
2023-01-02 11:06:15 -05:00
Timothy Slater
7b4e5d6ac0
PixelPaint: Add Text Tool
2022-12-16 10:14:20 +00:00