pcorless / icepdf

PDF Rendering and Viewing API in Java
Apache License 2.0
76 stars 21 forks source link

Resolve #345: Make icons customizable #347

Closed a-leithner closed 4 months ago

a-leithner commented 5 months ago

This aims to provide a first implementation of an abstraction that could be used to customize the icons used in ICEpdf's Swing components when using them in embedding applications (i.e. fixes #345).

Some key points of the changes:

I'm more than happy to discuss all changes and design decisions I made here. Especially the move of ImageColorIcon from extends ImageIcon to implements Icon and using composition rather than inheritance is something I'd like to hear opinions on. Also, I've placed a TODO in the constructor of AbstractColorButton, since I'm unsure if we can/should change the code calculating the preferred size the way I did (I'm also unsure of why we're changing the preferred size this way – shouldn't that component and most others calling setPreferredSize actually override getPreferredSize?).

pcorless commented 5 months ago

Thank you for for putting this together. I've started working my way though it.

pcorless commented 4 months ago

Thanks for the updates, I'll give it more look over but suspect it's ready to go.