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
Matthew Olsson
1ef5071d1b
LibPDF: Harden the document/parser against errors
2021-06-12 22:45:01 +04:30
Andreas Kling
dc65f54c06
AK: Rename Vector::append(Vector) => Vector::extend(Vector)
...
Let's make it a bit more clear when we're appending the elements from
one vector to the end of another vector.
2021-06-12 13:24:45 +02:00
Andreas Kling
de77946a8c
Terminal: Don't show window until we've added menubar to it
...
This removes the janky-looking window growth during startup.
2021-06-12 12:01:54 +02:00
Andreas Kling
68a307be4e
PixelPaint: Use ImageDecoder to load images out-of-process
...
This sandboxes the image decoding work done by PixelPaint to prevent
bugs in the decoding framework from compromising PixelPaint itself. :^)
2021-06-12 11:19:29 +02:00
Andreas Kling
92203c9821
PixelPaint: Don't allow Image::try_create_from_bitmap(nullptr)
...
This is not a valid use-case so let's prevent it at compile time.
2021-06-12 11:19:29 +02:00
Andreas Kling
9038bc675f
PixelPaint: Guarantee that constructed Layer always has a Gfx::Bitmap
...
Hoist any allocation failures so that layer factories never return a
bitmap-less layer.
2021-06-12 11:19:29 +02:00
Andreas Kling
c7f7c1f7f0
PixelPaint: Use move semantics around Layer construction and accessors
2021-06-12 11:19:29 +02:00
Andreas Kling
9c5de113b1
PixelPaint: Rename Layer::create_foo() => Layer::try_create_foo()
2021-06-11 23:06:46 +02:00
Andreas Kling
a9e98bad8a
PixelPaint: Rename Image::create_foo() => Image::try_create_foo()
...
Factory functions that may fail should be called try_create().
2021-06-11 22:51:10 +02:00
Andreas Kling
29e80178a8
PixelPaint: Convert to east-const style
2021-06-11 22:51:10 +02:00
Marcus Nilsson
d5fa0ea60f
FileManager: Save maximized window state on exit
...
When exiting FileManager in maximized state, save it and start in
maximized state on next launch.
2021-06-09 22:58:10 +02:00
Timothy
e9bafd768d
Browser: Fix crash on download
...
This will unveil the portal for RequestServer which is used to
download files in the Browser.
2021-06-09 18:10:27 +01:00
Ali Mohammad Pur
7ac196974d
Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&>
2021-06-08 19:14:24 +02:00