Tobias Christiansen
d4cf4b74c1
PixelPaint: Allow creation of Guides via the View-Menu
...
You can specify the offset in percent, and it's getting parsed and
calculated appropriately.
2021-08-07 02:52:47 +04:30
Marcus Nilsson
3392c66c94
PixelPaint: Remove context menu for MoveTool
...
Remove the context menu for MoveTool and move the actions to the layer
menu instead.
2021-08-03 09:04:57 +02:00
Clément Sibille
fb099ad38b
PixelPaint: Show image coordinates in the status bar
2021-08-02 00:49:24 +02:00
Andreas Kling
687a12d7fb
Userland: Add GUI::Window::add_menu() and use it everywhere
...
Applications previously had to create a GUI::Menubar object, add menus
to it, and then call GUI::Window::set_menubar().
This patch introduces GUI::Window::add_menu() which creates the menubar
automatically and adds items to it. Application code becomes slightly
simpler as a result. :^)
2021-07-21 21:24:26 +02:00
Andreas Kling
c7d891765c
LibGfx: Use "try_" prefix for static factory functions
...
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
Marcus Nilsson
95710b0147
PixelPaint: Make sure that a layer is always selected
...
Make sure that a layer is selected after creating it, removing
one or creating a new image. Also make layer_properties_widget
update on tab change.
2021-07-09 18:04:01 +02:00
Marcus Nilsson
791a018c99
PixelPaint: Add method to merge visible layers
...
This adds a function that merges all visible layers to one, ignoring the
invisible.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
9be08e33ea
PixelPaint: Add method to flatten image layers
...
This adds Image::flatten_all_layers() that allows the user to flatten
all the visible layers into one.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
e1906d74b8
PixelPaint: Make move_selection() cycle through layers
...
Previously move_selection() did not work as expected. Instead store the
selected layer index in a member variable and continue to cycle through
the layers when you come to the start/end. Also use it to scroll into
view. Lastly rename the function to cycle_through_selection() to make it
clearer what it does.
2021-07-05 20:39:30 +02:00
Marcus Nilsson
8d205ae62e
PixelPaint: Use layer menu as context menu in LayerListWidget
...
This enables the layer menu as a context menu in LayerListWidget,
setting the clicked layer as active for now, but in the future it
would be nice to have custom menu applying to the clicked layer instead
of the active layer.
2021-07-05 20:39:30 +02:00
Marcus Nilsson
2183d01eb0
PixelPaint: Ask to preserve transparency when exporting
...
Previously the alpha channel was thrown away when exporting to BMP or
PNG in PixelPaint, instead let the user decide.
2021-07-05 00:43:00 +02:00
Marcus Nilsson
05e8bea736
PixelPaint: Reset layer widgets when closing last tab
...
When closing the last tab the layer list widget and layer properties
widget did not reset since they still had a pointer to the image.
2021-07-02 17:54:01 +02:00
Andreas Kling
ee3a73ddbb
AK: Rename downcast<T> => verify_cast<T>
...
This makes it much clearer what this cast actually does: it will
VERIFY that the thing we're casting is a T (using is<T>()).
2021-06-24 19:57:01 +02:00
Davipb
22585e2845
PixelPaint: Expose more complex selection operations
...
Now that we use RectMask internally to store the selection, we can
expose more powerful APIs to allow for better control over the image
selection.
2021-06-22 11:00:00 +02:00
Felix Rauch
8d91dbf6c0
PixelPaint: Add loading and saving of color palettes
...
Color palettes can now be stored in and read from files. The default
palette will be read from `/res/color-palettes/default.palette`
instead of being hard-coded in PaletteWidget.
The file format is one color per line, in any format that can be
understood by `Gfx::Color::from_string`.
2021-06-21 22:32:58 +02:00
Marcus Nilsson
f2aa5efbeb
PixelPaint: Add basic support for closing tabs
...
This enables closing of tabs in PixelPaint, for the moment
very basic with no checking if the image is modified or saved.
2021-06-20 15:16:26 +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
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
Andreas Kling
91100f2f94
PixelPaint: Display an error message if exporting to PNG/BMP fails
2021-06-15 13:38:43 +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
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
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
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
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
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
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
c7c273c31d
PixelPaint: Add a toolbar to the main UI :^)
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
c6b44e215a
PixelPaint: Use GUI::CommonActions for zoom related actions
2021-05-15 20:36:41 +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
Brian Gianforcaro
1682f0b760
Everything: Move to SPDX license identifiers in all files.
...
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Jagger De Leo
2976311536
PixelPaint: Add keyboard zoom shortcuts
...
You can now use Ctrl+= and Ctrl+- to zoom in and out.
2021-04-16 19:57:28 +02:00
Jagger De Leo
b48b8c372e
PixelPaint: Add Zoom Reset button to new View Menubar.
...
If you lose your image while panning and zooming around, it is handy to
have a reset function to get back home. :^)
2021-04-16 19:57:28 +02:00
Andreas Kling
a2baab38fd
Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
...
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:
- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar
This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Andreas Kling
9288e64179
PixelPaint: Add icon and keyboard shortcut for the "New Image" action
2021-04-10 14:58:48 +02:00
Andreas Kling
4e56e9fa2a
PixelPaint: Alt shortcuts and book title capitalization in menus
2021-04-10 14:58:48 +02:00
Andreas Kling
78b12e1521
Userland: Turn all application menus into window menus :^)
2021-03-25 22:14:09 +01:00