Open ebourg opened 1 year ago
Would something like this (using JToggleButton
and ButtonGroup
) work?
Source code is available here. This example uses a lightweight library I wrote to simplify layout, but that's not strictly necessary. The icons are instances of FlatLaf's FlatSVGIcon
class, and the border is an instance of FlatLineBorder
. The buttons are styled using the "toolBarButton" client property.
Several UI toolkits have a concept of button groups, where adjacent buttons share their borders, for example:
It looks like this:
It would be great to have something similar in FlatLaf. I'm not sure how this could be implemented though. Maybe supporting rounded corners only on the left or on the right would be a first step, and then the layout could be configured such that the inner borders are superposed.