1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 07:44:59 +00:00
Commit graph

26 commits

Author SHA1 Message Date
Tim Ledbetter
a6f6a1afd2 Userland: Prefer non-fallible construction for LibGUI objects 2023-09-18 18:00:45 +02:00
Bastiaan van der Plaat
494a8cb816 AK: Add to_radians and to_degrees math functions 2023-09-10 08:38:29 +01:00
Andreas Kling
58e482a06d LibGUI: Remove Layout::try_add_spacer()
And fall back to the infallible add_spacer().

Work towards #20557.
2023-08-14 14:57:54 +02: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
Lucas CHOLLET
3f35ffb648 Userland: Prefer _string over _short_string
As `_string` can't fail anymore (since 3434412), there are no real
benefits to use the short variant in most cases.
2023-08-08 07:37:21 +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
Andreas Kling
655d9d1462 LibWeb: Make CSSPixels and Length use 64-bit (double) floating point
This fixes a plethora of rounding problems on many websites.
In the future, we may want to replace this with fixed-point arithmetic
(bug #18566) for performance (and consistency with other engines),
but in the meantime this makes the web look a bit better. :^)

There's a lot more things that could be converted to doubles, which
would reduce the amount of casting necessary in this patch.
We can do that incrementally, however.
2023-05-24 14:40:35 +02:00
MacDue
bd0bf8250e PixelPaint: Use ValueSlider for radial gradient hardness
This makes this input consistent with the hardness properties of other
tools.
2023-05-06 08:03:02 +02:00
MacDue
95c571ca53 PixelPaint: Make gradient tool hardness slider width match other inputs 2023-05-04 23:59:51 +02:00
MacDue
3a60ddc5a8 PixelPaint: Correct variable names in GradientTool.cpp
Previously these variables were all prefixed `size_`, but used for
the opacity value.
2023-05-04 23:59:51 +02:00
thankyouverycool
91bafc2653 LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
Tim Ledbetter
fd9b6878f6 PixelPaint: Clip the gradient tool preview to the active layer rect
This makes it easier to see what the result will be when using two
solid colors.
2023-04-30 00:24:06 +02:00
Torstennator
cd33f271b1 PixelPaint: Add radial gradient support
This patch adds radial gradients to the gradients tool.
2023-04-29 11:55:31 +01:00
Ethan Yeager
bf5a18babb PixelPaint: Correct gradient tool's position during preview 2023-04-14 13:42:45 +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
Sam Atkins
6b66e39df4 LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
2023-02-18 16:56:56 +00:00
Sam Atkins
9561ec15f4 Userland: Use Widget::add_spacer() everywhere 2023-02-18 16:56:56 +00:00
Karol Kosek
be717edd33 PixelPaint: Propagate errors from making tool property widgets 2023-02-16 23:36:58 +00:00
Karol Kosek
83da3c5c3e PixelPaint: Add an option for making a Gradient with a secondary color 2023-02-16 10:50:58 +00:00
Karol Kosek
1ce2d7e674 PixelPaint: Put the main gradient color at the cursor
It doesn't seem right to me that we are 'holding' a transparent color,
with the main color being on the opposite side.
2023-02-16 10:50: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
MacDue
69580d7f0e PixelPaint: Allow the gradient tool to work with selections
Previously the call to layer->did_modify_bitmap() was missing so the
selection was not applied.
2023-01-27 18:05:19 +00:00
MacDue
681ed93a41 PixelPaint: Fix gradient tool clipping issues
This ensures that the gradient does not paint over the rulers at
any zoom level, and also shows the guidelines/handles even when the
gradient is clipped.
2023-01-27 18:05:19 +00:00
Torstennator
452285a3f8 PixelPaint: Add a GradientTool
This patch adds a new gradient tool to pixelpaint that allows us to fill
the canvas with a smooth color gradient outline at the edge of the
filled area.
2023-01-26 10:37:26 +00:00