Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onion skin panel touchups #1589

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

scribblemaniac
Copy link
Member

These are some small modifications to the onion skin panel with the primary goal of decreasing the minimum width of the panel, and cleaning up the underlying structure a bit. Summary of changes:

  • Use QGroupBox to group together items in the panel. This is what this widget was intended for, but it does come with some subtle aesthetic changes that we will have to agree on.
  • Remove unnecessary elements. There were some useless horizontal spacers, and a layout item which could be set as the layout of a QWidget object instead.
  • Use a combination of the FlowLayout and HBoxLayouts for the distributed opacity section. Currently this is the widest section, and this allows the items to be arranged vertically only if there is not enough horizontal space.
  • Remove the fixed minimum size constraint on the widget.
  • Change the size hint of the vertical spacer so that a vertical scrollbar does not appear before an items start to go out of view.

Here is a comparison of the minimum configurations before and after.
Before:
Screenshot of onion skin panel before changes
After (min width):
Screenshot of new onion skin panel with a smaller width
After (min height):
Screenshot screenshot of new onion skin panel with same height

As you can see, it can now have a considerably smaller width. The group boxes actually add a little bit to the height and width though, but I think it's worth it for the improved readability of the panel overall.

Also removed some unnecessary elements that were there for layout
purposes, but the same effect could be achieved without them.

The opacity is split up into to QHBoxLayouts in prepartion for
adding a FlowLayout in the next commit.
@scribblemaniac scribblemaniac added 🔹 Minor PR (only one reviewer required) Enhancement UI Related to the visual appearance of the program labels Mar 27, 2021
Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. there's a small mis-alignment with the two spinboxes when they're below each-other... Normally I'd fix it with a QGridLayout but since Grid layout doesn't play well with a flow layout, I say we ignore that small detail for now.

@MrStevns MrStevns merged commit 8081ad1 into pencil2d:master Apr 5, 2021
@chchwy chchwy added this to the 0.7.0 milestone Jul 15, 2021
@MrStevns MrStevns modified the milestones: 0.7.0, v0.6.7 Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🔹 Minor PR (only one reviewer required) UI Related to the visual appearance of the program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants