Commit Graph

32182 Commits

Author SHA1 Message Date
Lady Gegga
c1b8f7c9c7 Base: Add Supplemental Symbols and Pictographs to Katica Regular 10
1F916, 1F988, 1F955, 1F968, 1F980, 1F940, 1F94C, 1F991, 1F969

https://www.unicode.org/charts/PDF/U1F900.pdf
2022-01-05 14:00:00 +01:00
Lady Gegga
f8bd3120a1 Base: Change some glyphs in font Katica Regular 10
1F50C, 1F5B2, 1F964, 1F941
2022-01-05 14:00:00 +01:00
Lady Gegga
a407511ebd Base: Add Box Drawing glyphs to font Katica Regular 10
2518, 2510, 250C, 2514, 253C, 2500, 251C, 2524, 2534, 252C,
2502

The following glyphs are ported directly from
2329c52ad9:
2550, 2551, 2554, 2557, 255A, 255D

https://www.unicode.org/charts/PDF/U2500.pdf
2022-01-05 14:00:00 +01:00
thankyouverycool
d375904978 Base+LibGUI: Add unique "Save As" icon
Icon by: Mustafa Quraish <mustafaq9@gmail.com>
2022-01-05 13:58:18 +01:00
Mustafa Quraish
7c69830169 PixelPaint: Add new icon for New Image from Clipboard
This is just a slight variation of `/res/icons/16x16/paste.png`, I've
removed the lines on the paper to make it look consistent with the
"New Image" icon, which is an empty piece of paper.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
e2c73a114d PixelPaint: Use 'save' action in toolbar instead of 'save as'
I think this is likely the more common operation and makes more sense
in the toolbar. It calls the 'save as' action internally anyway if there
is no associated file.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
c03f271bbf PixelPaint: Ask about unsaved changes for all tabs on close
Now, when trying to close the application, there is a separate prompt
for each open tab with unsaved changes. Each tab is closed after it is
handled appropriately (assuming the user didn't Cancel), this makes it
so that the message box is always asking about the currently active tab,
allowing the user to see that the image contains.

If at any point the user presses "Cancel", all remaining tabs are kept
open.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
915211252d PixelPaint: Mark editor as unmodified when creating a default image
This is similar to opening an empty text file in TextEditor, the user
is only asked to saved changes if they have made any changes to it.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
fc5c327751 PixelPaint: Mark editor as unmodified when opening an image
Previously a newly opened (and unedited) project was considered
modified, even though there was no need to actually re-save the
contents.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
8c4579bced PixelPaint: Only prompt for unsaved changes if there any
Previously MainWidget::request_close() would always put up the
message box asking to save unsaved changes, even if there aren't any.
This patch makes it so that the message box is only shown if the
undo stack is in a modified state.
2022-01-05 12:08:20 +01:00
Mustafa Quraish
2440d2c2fe PixelPaint: Move title and path from Image to ImageEditor
As noted in the latest hacking video, it doesn't seem to make much
sense to store the title and path in the image itself. These fields
have now been moved to the actual ImageEditor itself.

This allows some nice simplicfications, including getting rid of the
`image_did_change_title` hook of ImageClient (which was just a way to
report back to the editor that the title had changed).
2022-01-05 12:08:20 +01:00
electrikmilk
0b43a92eed Base: Add some Latin Extended-B characters
Adds 0180—01FF of the Latin extended-B section of the unicode table.
2022-01-05 02:34:04 -08:00
Luke Wilde
0b9ea712be LibJS: Implement Array.prototype.groupByToMap 2022-01-05 11:21:38 +01:00
Luke Wilde
48cc1c97d5 LibJS: Implement Array.prototype.groupBy 2022-01-05 11:21:38 +01:00
Luke Wilde
4a14455dff LibJS: Make MarkedValueList copyable and move assignable
This is required to store a MarkedValueList as the value of a HashMap.
2022-01-05 11:21:38 +01:00
Luke Wilde
c97244d3a5 LibJS: Add Handle specialisation for Value
This allows you to keep an arbitrary JS::Value alive without having to
hook visit_edges somewhere, e.g. by being a NativeFunction that
overrides visit_edges.

For example, this allows you to store JS::Handle<JS::Value> as the key
of a HashMap. This will be used to keep arbitrary Values alive in
the key of a temporary HashMap in Array.prototype.groupByToMap.

Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
2022-01-05 11:21:38 +01:00
mjz19910
1f1383fe1e unzip: Remove useless .characters() calls 2022-01-04 23:53:46 -08:00
mjz19910
2351bb2db9 Utilities/CMakeList: Remove duplicate target_link_libraries(...) 2022-01-04 19:14:57 -08:00
mjz19910
87b719a494 Utilities/CMakeList: Sort target_link_libraries(...) 2022-01-04 19:14:57 -08:00
Linus Groh
bfa42cbe4f LibJS: Remove the now retired TRY_OR_DISCARD() macro :^) 2022-01-04 23:37:26 +00:00
Linus Groh
9e50bd91a6 js: Remove uses of TRY_OR_DISCARD()
Slightly more verbose, but that's the last user of TRY_OR_DISCARD gone!
2022-01-04 23:37:26 +00:00
Linus Groh
c4f0f1cc05 LibTest: Remove uses of TRY_OR_DISCARD() from JavaScriptTestRunner
In one case we can replace it with MUST() and accept the crash (we also
VERIFY() that there wasn't an exception); in the other case we don't
need to return after a throw completion.
2022-01-04 23:37:26 +00:00
Linus Groh
6c9cf4d31a LibTest: Convert JavaScriptTestRunner's get_test_results() to ErrorOr 2022-01-04 23:37:26 +00:00
Linus Groh
29e96eceeb LibJS: Convert PropertyKey::from_value() to ThrowCompletionOr
Lots of MUST() - perhaps we'll eventually come up with a better API for
the common case where it can't fail.
2022-01-04 23:37:26 +00:00
Linus Groh
62356cff40 LibJS: Convert FunctionObject::bind() to ThrowCompletionOr 2022-01-04 23:37:26 +00:00
Linus Groh
245d486ba4 LibJS: Convert PromiseResolvingElementFunction to ThrowCompletionOr 2022-01-04 23:37:26 +00:00
Linus Groh
b4208c8ea1 LibJS: Remove unused Accessor::call_{getter,setter}()
If only we had such "a way to communicate to our caller if an exception
happened" - too bad it's dead code :^)
2022-01-04 23:37:26 +00:00
Linus Groh
0e363e92ef LibJS: Remove unused IndexedProperties::take_{first,last}() 2022-01-04 23:37:26 +00:00
Timothy Flynn
1116a29c19 LibUnicode: Remove now unused Unicode symbol loader
All generated sources are now linked via weak symbols.
2022-01-04 22:49:43 +00:00
Timothy Flynn
dd88ff70ac LibUnicode: Remove now unused value-from-string generator overload 2022-01-04 22:49:43 +00:00
Timothy Flynn
437b9fe204 LibUnicode: Convert UnicodeData to link with weak symbols 2022-01-04 22:49:43 +00:00
Timothy Flynn
f576142fe8 LibJS+LibUnicode: Convert UnicodeLocale to link with weak symbols 2022-01-04 22:49:43 +00:00
Timothy Flynn
cf8e11a562 LibUnicode: Add temporary overload of value-from-string generator
This is a temporary mechanism while LibUnicode is in an in-between state
where some symbols are weakly linked and others are dynamically loaded.
The latter require an asm() label to be loaded.
2022-01-04 22:49:43 +00:00
Timothy Flynn
ba4cdf34f8 LibUnicode: Convert UnicodeDateTimeFormat to link with weak symbols 2022-01-04 22:49:43 +00:00
Timothy Flynn
98709d9be1 LibUnicode: Convert UnicodeNumberFormat to link with weak symbols
Currently, we load the generated Unicode symbols with dlopen at runtime.
This is unnecessary as of 565a880ce5.

Applications that want Unicode data now link directly against the shared
library holding that data. So the same functionality can be achieved
with weak symbols.
2022-01-04 22:49:43 +00:00
Timothy Flynn
ffb3ba3079 Tests: Link some tests directly against LibUnicodeData
These were missed in 565a880ce5.

This wasn't an issue because these tests don't pledge/unveil anything,
so they could happily dlopen() the library at runtime. But this is now
needed in order to migrate LibUnicode towards weak symbols instead.
2022-01-04 22:49:43 +00:00
sin-ack
9121cc7cae LibWeb: Implement CanvasRenderingContext2D.measureText
This requires an implementation of the "text preparation algorithm" as
specified here:

html.spec.whatwg.org/multipage/canvas.html#text-preparation-algorithm

However, we're missing a lot of things such as the
CanvasTextDrawingStyles interface, so most of the algorithm was not
implemented. Additionally, we also are not able to use a LineBox like
the algorithm suggests, because our layouting infra is not up to the
task yet. The prepare_text function does nothing other than figuring out
the width of the given text and return glyphs with offsets at the
moment.
2022-01-04 22:41:07 +00:00
Marco Cutecchia
732e41714a ls: Fix duplicated error message when opening a directory fails 2022-01-04 22:47:57 +01:00
Marco Cutecchia
70f707d806 stat: Print an error if 'stat' fails 2022-01-04 22:47:57 +01:00
Michel Hermier
22efc34ec5 LibCrypto: Make Digests able to return bytes 2022-01-05 01:07:21 +03:30
Michel Hermier
3f0e425f1e LibCrypto: Mutualize Digests 2022-01-05 01:07:21 +03:30
Michel Hermier
4e851145ba LibCrypto: Make MultiHashDigestVariant getters const and nodiscard 2022-01-05 01:07:21 +03:30
Michel Hermier
1f4a27b80e LibCrypto: Remove spurious ; 2022-01-05 01:07:21 +03:30
Michel Hermier
25251f1b05 checksum: Use :hex-dump to format digest value 2022-01-05 01:07:21 +03:30
Michel Hermier
23fe07a148 checksum: Make name detection working even with a path 2022-01-05 01:07:21 +03:30
Andreas Kling
0c09617b48 LibGUI: Don't show "last saved" information for never-saved documents
When showing the "unsaved changes" dialog for an empty path, we should
say "last saved at ..." since that would be a lie.
2022-01-04 21:49:44 +01:00
Andreas Kling
219339d2a5 FontEditor: Use GUI::MessageBox::ask_about_unsaved_changes() 2022-01-04 21:49:44 +01:00
Andreas Kling
1a54ac262a PixelPaint: Make ImageEditor::m_undo_stack a regular value member 2022-01-04 21:49:44 +01:00
Andreas Kling
490d385d01 PixelPaint: Use GUI::MessageBox::ask_about_unsaved_changes()
To make the last-saved-at timestamp show up correctly, we also now mark
the editor's undo stack as unmodified on save.
2022-01-04 21:49:44 +01:00
Andreas Kling
82b071943d PixelPaint: Add "save" action
Let's have this as a complement to the "save as" action :^)
2022-01-04 21:49:44 +01:00