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
Aatos Majava
a49a15cabf
PixelPaint: Set the image title when creating a new image
2021-06-16 21:27:05 +02:00
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
Mateusz Górzyński
4aff4249aa
PixelPaint: Alternate selection outline between black and white
2021-06-15 16:15:09 +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
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
Marco Cutecchia
ea03b43fff
PixelPaint: Update Image.{cpp, h} to use east const
2021-06-02 18:07:14 +02:00
Marco Cutecchia
76adac103e
PixelPaint: Support opening more image file formats
...
Previously we could only open .pp files, now we can open all formats
supported by Gfx::Bitmap::load_from_file
2021-06-02 18:07:14 +02:00
Max Wipfli
229414b002
Applications: Use titlecase and distinct underlined characters in menus
...
This changes (context) menus across the system to conform to titlecase
capitalization and to not underline the same character twice (for
accessing actions with Alt).
2021-05-21 18:41:28 +01:00
Andreas Kling
10ea84a815
PixelPaint: Wrap the layer list in a GUI::GroupBox and tweak width
2021-05-16 01:11:56 +02:00
Andreas Kling
6c2c3b920e
PixelPaint: Style the application name as "Pixel Paint" :^)
2021-05-16 01:11:56 +02:00
Andreas Kling
c7244e37eb
PixelPaint: Start with a smaller new image (and smaller window)
...
We started this app with an overwhelmingly huge window. Shrink it.
2021-05-16 01:11:56 +02:00
Andreas Kling
4c186d1f44
PixelPaint: Stop creating two blue and yellow layers on startup
...
This was nice for testing, but let's start the app with just a white
background layer instead. :^)
2021-05-16 01:11:56 +02:00
Andreas Kling
5579ec767e
PixelPaint: Add a statusbar to the main window
2021-05-16 01:11:56 +02:00
Andreas Kling
864392254e
PixelPaint: Tweak height of palette widget
2021-05-16 01:11:56 +02:00
Andreas Kling
01d88f1b31
PixelPaint: Wrap the toolbox widget in a GUI::ToolbarContainer
...
This makes it consistent with the main toolbar and looks quite nice.
2021-05-16 01:11:56 +02:00
Andreas Kling
c7c273c31d
PixelPaint: Add a toolbar to the main UI :^)
2021-05-16 01:11:56 +02:00
Andreas Kling
5b6d879721
PixelPaint: Tweak placement of current colors in palette widget
2021-05-16 01:11:56 +02:00
Andreas Kling
8c044d4f52
PixelPaint: Convert main UI to GML :^)
2021-05-16 01:11:56 +02:00
Andreas Kling
afc3ed228d
PixelPaint: Make the color palette widgets smaller and square
2021-05-16 01:11:56 +02:00
Andreas Kling
ad2752276a
PixelPaint: Use GUI::Toolbar inside the toolbox widget
...
We don't need to implement our own toolbar and tool button classes
when the ones from LibGUI work just fine. :^)
2021-05-16 01:11:56 +02:00
Andreas Kling
c6b44e215a
PixelPaint: Use GUI::CommonActions for zoom related actions
2021-05-15 20:36:41 +02:00
Andreas Kling
ae7c5411a6
PixelPaint+Base: Tool icon refresh :^)
...
Redraw and shrink all tool icons to 16x16 instead of the off-beat size
(26x26) they had previously.
2021-05-15 18:35:06 +02:00
Andreas Kling
31d4bcf5bf
Userland: Tighten a *lot* of pledges! :^)
...
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
2021-05-13 23:28:40 +02:00