Commit graph

50061 commits

Author SHA1 Message Date
Tim Ledbetter f132751fae PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
Tim Ledbetter fc137a7827 LibGfx: Correct off by one error in Point::constrain()
Previously, the y value would be clamped to a value one less than
necessary.
2023-05-05 16:35:42 +01:00
Tim Ledbetter ea0b527675 PixelPaint: Allow lasso tool to select outside the active layer
This makes the lasso tool behavior consistent with other selection
tools.
2023-05-05 16:35:42 +01:00
Tim Ledbetter 971a5467bf PixelPaint: Use the crosshair cursor with the lasso tool
This matches the behavior of other selection tools.
2023-05-05 16:35:42 +01:00
Caoimhe 5e4d835caf FontEditor: Use LibFileSystemAccessClient 2023-05-05 16:25:55 +01:00
Caoimhe f663e2dbd1 FontEditor: Don't paint in GlyphEditorWidget if m_font is null
The font isn't set in the constructor, there may be a case where the
font hasn't loaded before the first paint event. Therefore, we should
not paint if the font is null. All other methods should be fine.
2023-05-05 16:25:55 +01:00
Caoimhe 08668e8084 LibGUI: Fix crash when not using a custom font in GlyphMapWidget
`m_original_font` is only set if `GlyphMapWidget::set_font` is called.
But, if the user of `GlyphMapWidget` decides not to set a font,
there will be no value for `m_original_font`.

This commit fixes that issue by checking if `m_original_font` is not
null before attempting to use it.
2023-05-05 16:25:55 +01:00
Caoimhe c43295b668 LibGfx: Add Core::File variant of BitmapFont::write_to_file 2023-05-05 16:25:55 +01:00
Caoimhe 0d2ca125b3 LibGfx: Add a MappedFile variant of BitmapFont::try_load_from_file
Let's make it possible to create a BitmapFont directly from a MappedFile
instead of a file path.
2023-05-05 16:25:55 +01:00
Andreas Kling 74d34134ff Documentation: Add Qt6 SVG module to Ladybird build deps on Ubuntu 2023-05-05 17:12:43 +02:00
Andreas Kling 4b5cbe7931 Ladybird: Use vector icons in the browser toolbar
We now load SVG icons (via the Qt resource system) and render them into
a QIcon (with normal and disabled variants) using system colors.
We also re-render them if the system color theme changes.

This instantly makes Ladybird look less foreign on my Linux box.

I drew the icons myself, and they could definitely be more optimized,
but this was my first time using Inkscape. :^)
2023-05-05 16:58:08 +02:00
Andreas Kling 60312f2c83 Ladybird: Remove the "home" icon from the toolbar (and the concept)
This feature isn't really that useful in practice, so let's remove it.
(Other browsers haven't had this action for years either.)
2023-05-05 16:58:08 +02:00
Tom f0f82c6391 LibGfx/PNG: Add support for animated PNG images 2023-05-05 15:20:44 +01:00
Tom e7921cfe14 LibGfx: Add first_animated_frame_index method to ImageDecoder
Some image formats such as APNG may not use the first frame for
animations.
2023-05-05 15:20:44 +01:00
Lucas CHOLLET 5a4c61838f FileSystemAccessServer: Use ECANCELED instead of -1
-1 was used when the user cancel the dialog, `ECANCELED` is a bit more
explicit about what it is.
2023-05-05 15:12:24 +01:00
0GreenClover0 8bb2663a22 LibWeb: Zero out margins if width is not 'auto' in BFC's compute_width
Reverse the condition to satisfy the spec comment. Probably a typo.
A 3 year old typo! :^)
2023-05-05 13:26:41 +02:00
Cubic Love 0d808f6dcb Base+Minesweeper: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for game assets.
2023-05-05 11:52:33 +01:00
Cubic Love 9c8385c605 Base+FlappyBug: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for game assets.
2023-05-05 11:52:33 +01:00
Cubic Love c6454d37c0 Base+ColorLines: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for game assets.
2023-05-05 11:52:33 +01:00
Cubic Love 248542535d Base+LibChess: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for game assets.
2023-05-05 11:52:33 +01:00
Cubic Love 240a56d9ce Base+CatDog: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for demo assets.
Also, update the example presenter file which uses a CatDog sprite.
2023-05-05 11:52:33 +01:00
Cubic Love 1d6f2e5608 Base+LibCards: Move card backs from /icons/ to /graphics/
The graphics directory is a more suitable home for game assets.
Also, move card backs into their own subfolder in preparation for a
themes subfolder for card fronts.
2023-05-05 11:52:33 +01:00
Aliaksandr Kalenik 34b1186272 LibWeb: Remove early resolve to auto while calculating border-box width
`Length::resolved(Node&)` transforms infinite values to "auto".

Following transformations:
Infinite (Length) -> "auto" -> 0 (px)
cause border-box width to be resolved in zero when it should be inf px.

Removing `Length::resolved(Node&)` makes it work right:
Infinite (Length) -> Infinite (px)

Fixes #18649
2023-05-05 10:01:28 +02:00
stelar7 2d2d2539b4 LibTLS: Use the TBS ASN.1 data when verifying certificates 2023-05-05 09:36:43 +03:30
stelar7 0b70314379 LibCrypto: Store the TBS ASN.1 data on the certificate
This way we dont need to guess the offsets in LibTLS when using it.
2023-05-05 09:36:43 +03:30
Ali Mohammad Pur 24c7995743 Shell: Rename the verb {lookup => look_up} 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 4d00b372c8 Shell: Make the builtins' POSIX mode requirement more explicit
Instead of checking in each individual function, add the mode to
ENUMERATE_SHELL_BUILTINS() and let has_builtin() handle it.
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 367da548ff Shell: Make null_or_alternative actually look up the given variable 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 1403e56535 Shell: Place all variables in the closest nonlocal frame in POSIX mode 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 0d8b90aec6 Shell: Allow newlines before do in POSIX for loops 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur fca5a34ad3 Shell: Allow assignment-prefixed commands to run builtins
`env` is not capable of running shell builtins, so make a simple
builtin in its place.
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur e2336d9de5 Shell: Add support for unset -v in POSIX mode 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 71441ea932 Shell: Allow lossy conversion from list -> string in POSIX mode
Similar to bash, this operation returns only the first element because
reasons.
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 8a042cd9cb Shell: Allow non-exhaustive 'case' statements in POSIX 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur ef551a045d Shell: Add support for the POSIX 'read' builtin 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur aecd91aedc Shell: Correctly handle escaped quote characters in strings
Previously "foo\`bar" was treated literally, but \` is a valid escape
character.
This commit makes that string correctly evaluate as "foo`bar".
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur bbfedf17b7 Shell: Actually execute loop/case bodies when running them 2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 7b031138fc Shell: Correctly handle commands after heredoc contents
Previously we did not emit a newline after the ending heredoc key, which
wreaked havoc on the parser logic, leading to parse errors.
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 93413f8682 Shell: Use the correct range for named variable expansions
Previously we were starting the variable expansions before the starting
'$' and calculating the wrong length, this commit makes it so we
calculate the right range for them.
2023-05-05 09:35:24 +03:30
Ali Mohammad Pur 79c76d67ce Shell: Add the 'break' and 'continue' POSIX builtins
These only support n=1 for now.
2023-05-05 09:35:24 +03:30
Aliaksandr Kalenik 0318ac5ce4 LibWeb: Remove setting length to 0px if it is not definite
If available width (or height) is max-content and width (or height)
value is 100% it should be resolved in infinite px, not 0 px.

Fixes #18639
2023-05-05 06:20:44 +02:00
Fabian Dellwing b443c0b80b Ports: Update OpenJDK 2023-05-05 02:19:05 +02:00
Fabian Dellwing 36a26d7fa8 Userland: Fix wrong signature of dladdr
This function is supposed to take a `const void *addr` as first
parameter, but we took a `void *addr`.

https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/baselib-dladdr-3.html
2023-05-05 02:19:05 +02:00
Ali Mohammad Pur 87e95ceb69 LibXML: Notify the listener about the root node as well
We previously did not notify the listener about entering the root node,
which caused the following snippet to produce the wrong output:
    a = new DOMParser
    a.parseFromString("<x/>", "text/xml").documentElement // != null
2023-05-05 01:33:49 +02:00
kleines Filmröllchen 0ab19dc4cd Piano: Allow per-track controls (again)
This makes Piano exactly as usable as when I started the large refactor
some years ago, which *sounds* like I'm a terrible person but now it (1)
looks nicer and (2) has a flexible backend that can already deal with
aribtrary kinds of processors on any track.
2023-05-05 01:32:09 +02:00
kleines Filmröllchen d757027638 Piano: Use size_t for track count 2023-05-05 01:32:09 +02:00
kleines Filmröllchen 876f00e635 Base: Demonstrate ArgsParser and format strings in cli project template
This demonstrates both an option and an optional positional argument, as
well as some simple format string printing with {}.
2023-05-05 02:15:43 +03:30
kleines Filmröllchen fd68e9f1ac Base: Split out cpp-library template files into actual files
These were part of the postcreate script previously, but with the new
powers of sed, we can text-replace the library name and make changing
them much more convenient.
2023-05-05 02:15:43 +03:30
kleines Filmröllchen 2451e97a11 Base: Adjust serenity-application template with some cpp-gui pieces
Namely, the window title and size are carried over, since a larger
window with a more readable "Example Application" title is better to
understand. I also took the opportunity to add a missing trailing
newline to the generated CMake file.
2023-05-05 02:15:43 +03:30
kleines Filmröllchen 7a0fae7be1 Base: Remove the cpp-gui HackStudio template
This template is essentially an older version of the
serenity-application template, it does not compile anymore and is
therefore entirely redundant.
2023-05-05 02:15:43 +03:30