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

Tweak the toolbar separators #3974

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Apr 18, 2023

Identify the Bug or Feature request

Implements #3893

Description of the Change

All separators in the toolbar are now created via a helper method that builds a separator with symmetric padding. This is done in favour of sandwiching a separator between struts and allows the separator itself to decide how to pad itself. If orientation support is added again in the future, the separator will provide a way to pad itself appropriately with needing separator struts for vertical and horizontal orientations.

As a result, the separator between the tools and the option panel now has symmetric padding instead of being right up against the VBL tool button. A separator was also added in the *BL option panel, between the shape tools and the mode selector. This distinguishes the two now that we have a flatter and less colourful set of icons.

A bit of padding was adding to both ends of the panel so that the contents aren't pushed uncomfortably close to the edge of the window.

The toolbar is no longer floatable. This happened to be the case already since 1.12 due to FlatLaf defaulting to non-floatable toolbars. By making this explict, we don't have to keep around the logic needed for floating and orientation changes, nor will this be a theme-dependent bit of functionality. Floating can always be added again in the future if it's deemed desirable, along with better orientation support.

Possible Drawbacks

Some might like floating. But that's already disabled in 1.12 and in the 1.13 betas for all themes other than Aah.

Documentation Notes

N/A

Release Notes

  • Fixed the spacing of separators in the main toolbar.

This change is Reviewable

All separators in the toolbar are now created via a helper method that builds a separator with symmetric padding. This
is done in favour of sandwiching a separator between struts and allows the separator itself to decide how to pad
itself. If orientation support is added again in the future, the separator will provide a way to pad itself
appropriately with needing separator struts for vertical and horizontal orientations.

As a result, the separator between the tools and the option panel now has symmetric padding instead of being right up
against the VBL tool button. A separator was also added in the *BL option panel, between the shape tools and the mode
selector. This distinguishes the two now that we have a flatter and less colourful set of icons.

The toolbar is no longer floatable. This happened to be the case already since 1.12 due to FlatLaf defaulting to
non-floatable toolbars. By making this explict, we don't have to keep around the logic needed for floating and
orientation changes, nor will this be a theme-dependent bit of functionality. Floating can always be added again in the
future if it's deemed desirable, along with better orientation support.
@cwisniew cwisniew merged commit 3b597dc into RPTools:release-1.13 Apr 19, 2023
@kwvanderlinde kwvanderlinde deleted the feature/3893-visual-separation-in-toolbar branch April 19, 2023 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants