Commit Graph

631 Commits

Author SHA1 Message Date
Marco Cutecchia
24c243942d Browser: Add setting to change homepage URL 2021-06-18 10:20:24 +02:00
Elliot Maisl
90873781c1 PixelPaint: Add new selection moving modes
If you press "spacebar" while moving a selection, it will now move the
origin point of the selection; and if you press "control" it will move
it relatively to the center.
2021-06-17 23:02:53 +02:00
Erik Sommer
96588adbd4
PixelPaint: Update debug message in the copy action to the used method (#8113) 2021-06-17 19:53:45 +02:00
Idan Horowitz
dcb55db99b LibJS: Replace boolean without_side_effects parameters with an enum 2021-06-17 16:52:15 +02:00
stelar7
22851287b1 Spreadsheet: Pledge 'fattr' to avoid crashing after exporting as csv 2021-06-17 18:49:44 +04:30
Gunnar Beutner
631d36fd98 Everywhere: Add component declarations
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Linus Groh
317b88a8c3 LibJS: Replace Object's create_empty() with create() taking a prototype
This now matches the spec's OrdinaryObjectCreate() across the board:
instead of implicitly setting the created object's prototype to
%Object.prototype% and then in many cases setting it to a nullptr right
away, it now has an 'Object* prototype' parameter with _no default
value_. This makes the code easier to compare with the spec, very clear
in terms of what prototype is being used as well as avoiding unnecessary
shape transitions.

Also fixes a couple of cases were we weren't setting the correct
prototype.

There's no reason to assume that the object would not be empty (as in
having own properties), so let's follow our existing pattern of
Type::create(...) and simply call it 'create'.
2021-06-16 22:49:04 +01:00
Ali Mohammad Pur
66e5e74374 Spreadsheet: Remove the offset used for exception TextRanges
After yet another rewrite of how GUI::TextEditor interprets text ranges
this was broken yet again :P
2021-06-17 01:08:27 +04:30
Ali Mohammad Pur
0c9a505ad1 Spreadsheet: Remove 'return (...)' workaround in conditional formatting
Now that LibJS can evaluate expressions correctly, that workaround was
breaking conditional formatting.
2021-06-17 01:08:27 +04:30
Ali Mohammad Pur
16b4a78072 Spreadsheet: Do not cancel drag-select when moving over a cell corner
Fixes #4277.
2021-06-17 01:08:27 +04:30
Ali Mohammad Pur
a01358f015 Spreadsheet: Correctly resolve nonstandard column names 2021-06-17 01:08:27 +04:30
Ali Mohammad Pur
b11b3c2f1c Spreadsheet: Make the XSV parser start with a preview parse
Instead of parsing the whole document. That's really wasteful and
super slow.
2021-06-17 01:08:27 +04:30
Aatos Majava
a49a15cabf PixelPaint: Set the image title when creating a new image 2021-06-16 21:27:05 +02:00
Timon Kruiper
3e73cfc08c Help: When opening a page, make sure it is selected in the tree view
This has to be called with a `deferred_invoke`, since on startup the
tree view contains no data yet.
2021-06-16 16:30:54 +04:30
Timon Kruiper
a5ecac5494 Help: Make sure the home page is actually shown when opening the app
Previously `open_page` was called multiple times when opening the
application, once for the actual page, but also in
`tree_view.on_selection_change`. At startup there is no valid selection
yet, which caused an empty page to be loaded. Prevent this by early
returning if the `path` is null.
2021-06-16 16:30:54 +04:30
Andreas Kling
0c8dce60a2 PixelPaint: Don't open new images in background tabs
When opening/creating a new image, let's make it the foreground tab.
2021-06-16 12:12:39 +02:00
Andreas Kling
abc40af809 PixelPaint: Make images keep track of their path & title
The title is either "Untitled" (default), or the basename of the
image after we've opened or saved it.
2021-06-16 12:12:39 +02:00
Andreas Kling
35456f035c PixelPaint: Make ImageEditor::image() return a reference (Image&)
In the new tabbed world, every ImageEditor always has an associated
Image, so this simplifies a bunch of things. :^)
2021-06-16 12:12:39 +02:00
Andreas Kling
c6dd3377ee PixelPaint: Make the main UI tabbed and allow multiple open images :^)
This patch adds a GUI::TabWidget to the main UI and allows having
multiple images open at the same time.

Some of the changes here are a bit hackish and mechanical and there's
still code around that needs more work to fit better in the new world.

One nice side-effect of this change is that ImageEditor now always
has one Image associated with it, and it never changes.
2021-06-16 12:12:39 +02:00
Andreas Kling
8763492e34 PixelPaint: Make main window a little bit taller by default 2021-06-16 12:12:39 +02:00
Apoorv Mishra
89855d0b8c HexEditor: Use Yes/No/Cancel prompts for message boxes
Use Yes/No/Cancel prompts in message box for saving changes
on closing a file with unsaved changes.

Fixes #7169
2021-06-16 10:52:23 +02:00
Idan Horowitz
8c7fe8d6c8 AK: Add support for removing SinglyLinkedList nodes during iteration
This commit also fixes the now-broken usage of SinglyLinkedList::remove
in the Piano application.
2021-06-15 23:59:21 +01:00
Mateusz Górzyński
4aff4249aa PixelPaint: Alternate selection outline between black and white 2021-06-15 16:15:09 +02:00
Andreas Kling
a1eadc755d LibGUI: Allow tweaking each edge of TabWidget's content margins
Instead of having a single uniform margin around the child content of
a TabWidget, use a GUI::Margins to allow individual per-edge margins.
2021-06-15 14:28:39 +02:00
Andreas Kling
2052796947 PixelPaint: Clear selection when opening a new image 2021-06-15 13:38:43 +02:00
Andreas Kling
91100f2f94 PixelPaint: Display an error message if exporting to PNG/BMP fails 2021-06-15 13:38:43 +02:00
Andreas Kling
3e4b48f68e PixelPaint: Avoid unnecessary temporary layer bitmaps during PP load
When opening a PP file, we were creating a layer first with an empty
bitmap, and then replacing it with the loaded bitmap from the file.

This patch reorders things so we never create the empty bitmap in
between, saving time and avoiding a memory spike.
2021-06-15 10:05:50 +02:00
Andreas Kling
398bf045c6 PixelPaint: Increase default size of new images from 1x1 to 480x360 2021-06-15 10:05:16 +02:00
Andreas Kling
eb76b18ee3 PixelPaint: Don't allow creating empty layers or images 2021-06-15 10:05:16 +02:00
Andreas Kling
8731bc9ead PixelPaint: Display an error message if opening a file fails 2021-06-15 10:05:16 +02:00
Andreas Kling
c333aec9f3 PixelPaint: Display an error message if saving to PP file fails 2021-06-15 01:16:34 +02:00
Andreas Kling
fa7bb98b1e PixelPaint: No need to pass ImageEditor& to Selection::paint()
It already has a reference to the editor in m_editor.
2021-06-15 01:16:34 +02:00
LepkoQQ
e6f27cec39 PixelPaint: Add actions to swap colors or reset them to default values 2021-06-15 00:13:03 +02:00
LepkoQQ
db99e0917c PixelPaint: Add menu items for Select All and Clear Selection
We also need to update the image editor when clearing selection
otherwise the last state of the selection will be displayed until an
update happens.
2021-06-15 00:13:03 +02:00
Andreas Kling
068ca3a394 PixelPaint: Always animate marching ants during interactive selection
The Selection object now tracks whether there is an ongoing interactive
selection (originating from one of the selection tools). If so it makes
sure to pump the marching ants animation.
2021-06-14 18:25:17 +02:00
Andreas Kling
f54164e8ae PixelPaint: Make new pasted layer active immediately
Also clear any selection that existed before pasting. This feels a bit
more intuitive. We may also want to consider switching to the "Move"
tool automatically on paste, but I'm less sure about that.
2021-06-14 18:25:17 +02:00
Andreas Kling
765286f691 PixelPaint: Add copy action (copies the selection from active layer)
You can now select a part of a layer, copy it, and then paste it as
a new layer. Very cool :^)
2021-06-14 18:25:17 +02:00
Andreas Kling
4cecd79000 PixelPaint: Draw the current editor selection as marching ants
This patch moves the marching ants painting code to Selection and
unifies the timer mechanism so that all marching ants are synchronized
which looks neat. :^)
2021-06-14 18:25:17 +02:00
Andreas Kling
1b897ec561 PixelPaint: Add a Selection class (ImageEditor has a Selection)
This will represent a complex, region-based selection in the future.
For now though, it's just a simple rectangle. :^)
2021-06-14 18:25:17 +02:00
Andreas Kling
96b52f13e4 PixelPaint: Implement basic rectangular selection (preview only)
Using the rectangle select tool, you can now drag out a selection which
will be drawn in the form of "marching ants" :^)
2021-06-14 18:25:17 +02:00
Andreas Kling
4bd905de0e PixelPaint: Add a new "Rectangle Select" tool :^)
This patch only adds the tool along with a toolbar icon for it.
It doesn't do anything yet.
2021-06-14 18:25:17 +02:00
Andreas Kling
3ed6a3fea8 Calculator: Fix offensive button misalignment
The UI of this application is still quite bad/uneven, but this at
least fixes the most egregious button misalignment.
2021-06-13 21:48:15 +02:00
Andreas Kling
7d90455fad Browser: Fix build breakage from 29cce65 2021-06-13 21:22:11 +02:00
Marcus Nilsson
4faff69974 Browser: Add download finished graphics to download widget
Not the prettiest, but visually indicates that the download has finished
successfully.
2021-06-13 20:55:58 +02:00
Marcus Nilsson
29cce65d2f Browser: Add close on finished checkbox to download widget
Let the user choose if they want the download widget to close when
finished, also save the users choice for future downloads.
2021-06-13 20:55:58 +02:00
Jelle Raaijmakers
c247d7a662 Utilities: Change unzip -o option to -d
Other `unzip` implementations universally use `-d` to indicate the
output directory, so let's follow this convention.
2021-06-13 17:05:48 +01:00
sinmineryt
2e1a01a499
TextEditor: Don't allow opening directories
Previously it was possible to open a directory in the TextEditor
application. Like device files, these are now rejected with an error
message.
2021-06-13 12:38:07 +01:00
FalseHonesty
fa101d6bf6 VideoPlayer: Create application to parse (and eventually play) videos
This application will eventually be able to actually play videos, but
for now it is used to parse and dump decoded data from the VP9 decoder.
2021-06-12 22:48:28 +04:30
Matthew Olsson
69410d7f4e PDFViewer: Switch back to up/down page icons
This time I remembered to actually commit the image files, oops :^)
2021-06-12 22:45:01 +04:30
Matthew Olsson
e7b70a1435 PDFViewer: Display error dialog if necessary instead of crashing 2021-06-12 22:45:01 +04:30