kirill-grouchnikov / radiance

Building modern, elegant and fast Swing applications
BSD 3-Clause "New" or "Revised" License
807 stars 89 forks source link

[Theming] Support customizing title pane buttons #444

Closed kirill-grouchnikov closed 1 year ago

kirill-grouchnikov commented 1 year ago

Splitting off of https://github.com/kirill-grouchnikov/radiance/commit/0a0c2e415512304053abf07342143173601b60b4#commitcomment-93364364

Add APIs to allow customizing the icons and the tooltips / texts used for title pane buttons:

custom-titlepanebuttons1 custom-titlepanebuttons2
kirill-grouchnikov commented 1 year ago

@ed-erwin-tf

ed-erwin-tf commented 1 year ago

Thanks this could be useful to me.

I would want my icons to look similar to your defaults, so I've examined code in the "Blade" classes. Those are "internal", but it looks like they only use public apis, so I could probably replicate them.

By the way, I just found that BladeDrawingUtils.paintBladeSimpleBorder() does not dispose of the graphics object. (No point opening a bug for that.)

kirill-grouchnikov commented 1 year ago

Yes, the idea is definitely to not block app code. The internal flow there is mostly around getting the stroke width. I'll look at the disposal.