lbalazscs / Pixelitor

A desktop image editor
https://pixelitor.sourceforge.io/
GNU General Public License v3.0
182 stars 71 forks source link

[UI] Add several layer groups to top level #295

Closed Imerion closed 1 year ago

Imerion commented 1 year ago

I tried out the Layer groups feature, which seems to work great. But I can't seem to add several layer groups to top level. Using the "New Empty Group" function will always add a new group within the existing one. Perhaps this is intended, but when breaking up a group it becomes possible to have several groups in top level. Perhaps I'm not just sure of how to do, but it would be practical to have several groups in top level as in picture two without having to break up a larger group first:

Group1

Group2

Imerion commented 1 year ago

Experimenting some more with this, I realize my problem is rather that I can't seem to deselect the layers. Creating a new regular layer and then selecting it makes it possible to create a new layer group at top level. But if all I have is two layer groups I can't seem to find a way to create a new layer group "beside" them, so to speak.

lbalazscs commented 1 year ago

One big limitation is currently that layers can't be dragged into groups. It would be nice if one could just create an empty layer group and then drag-and-drop layers into it, but this is not easy to implement. So that's why the rule is that if a layer group is selected, then everything is added inside it: this makes it relatively easy to add layers inside the group. The downside is that if you only have a group at the top level, and no ordinary layer that could be temporarily selected, then you won't be able to add anything else at the top level.

All this is just a (certainly frustrating) user interface problem problem: as you noticed, the engine supports layer groups in any combination. Do you have any ideas on how this could be improved?

Perhaps a temporary rule could be that if something is added while holding the Alt key down, then it would always be added at the top level.

Imerion commented 1 year ago

I was thinking there could simply be two options in the menu: "Add new layer group" and "Add layer group in selected layer" . (Perhaps the wording could be more clear.) But your suggestion, simply holding down the Alt key works good as well. Perhaps the status bar can show a tip that this is possible when hovering over the menu entry. (I have learned many useful things that way. :)

On a related note - as a quick way to handle moving layers without needing to add drag and drop, how about adding two buttons in the layer panel with arrows for up and down, that moves the selected layer or group up and down just as the menu entries do? That would save a few clicks for a common action and make it more discoverable.

lbalazscs commented 1 year ago

Fun fact: old versions of Pixelitor, such as 1.0.0 from 2010 couldn't reorder ordinary layers by drag-and-drop, so there were buttons to reorder them:

old_screenshot

Nowadays, the button section of the layer panel is pretty full, so I will have to shrink the buttons just to add an "add group" button. The layers inside groups can be reordered via the Ctrl+PgDown and Ctrl+PgUp key combinations. The tricky part is taking a layer out of a group or moving an existing layer into a group. Maybe I should create special key combinations for those actions, or maybe Ctrl+PgDown and Ctrl+PgUp should be extended to work across the group boundary.

Imerion commented 1 year ago

Fun to see how the program used to work. :) It really has come a long way since then. I don't remember when I started using it, but today it is my main image editor which I use for almost everything I need to do. :)

I can see how the button row would get a bit crowded with new buttons. Ctrl+PgDown/PgUp extended to work across group boundaries should work well I think.

lbalazscs commented 1 year ago

The newest commit implements the ability to move layers across group boundaries, allowing them to jump in and out of groups by using Ctrl-PgUp and Ctrl-PgDown.

This also kind of solves the original problem: the new layer groups are still created inside selected layer groups, but now it's relatively easy to move them out with Ctrl-PgUp and Ctrl-PgDown. Layer groups can be moved like regular layers, just make sure that the group itself is selected, and not one of its layers.

Regarding the drag-and-drop reordering of layers within groups: I put it in the Roadmap, which is a collection of "someday maybe" ideas.

LinuxBeaver commented 1 year ago

This is a useful update. image

Imerion commented 1 year ago

I have used these experimental features a lot the last months and have not encountered any problems. I have also tried a lot of unexpected things with the new features specifically and it all seems to work well. Is there any part of the new features, especially the layer functions, that you would like me to focus on especially when testing? Otherwise I believe this to be quite robust right now. :)

lbalazscs commented 1 year ago

This was implemented in the recently released version 4.3.1.