Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Change the container of the toolbar from
Box
toJToolBar
and use an empty border for the toolbar itself.Motivation and Context
Generally toolbars are placed in a component that uses
BorderLayout
. When doing so it gives the LaF more context on how to paint the toolbar.With the toolbar being placed in a
Box
container the toolbar only paints it border along the space it consumes resulting in an odd visual e.g.On Metal the background is different midway through the topbar (zoom in to see it).
On Nimbus the border stops midway.
JToolBar
uses the exact same layoutmanager asBox
resulting in the same layout as before.By giving the actual toolbar portion an
EmptyBorder
doubly painted borders are avoided.How Has This Been Tested?
Layout has not been affected. See screenshots
Screenshots (if appropriate):
IntelliJ (Looks the same on the other darklaf themes):
Motif:
Metal:
Nimbus:
Windows:
Windows Classic:
Types of changes
Checklist:
I have updated the documentation accordingly.Not needed.