mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.14k stars 235 forks source link

WebCollapsiblePane state in style #552

Closed husker-dev closed 5 years ago

husker-dev commented 5 years ago

I have not found what state of collapsiblepane should I use to change style when it is collapsed. I have tried collapsed but it doesn't work.

<style type="collapsiblepane">
    <painter>
        <decorations>
            <decoration>
                <WebShape round="8,8,0,0" />
                <WebShadow type="outer" width="2" />
                <LineBorder color="40,40,40" />
                <ColorBackground color="65,65,65" />
            </decoration>
            <!-- \/\/ Here \/\/ -->
            <decoration states="collapsed">
                <WebShape round="8,8,8,8" />
            </decoration>
            <!-- /\/\ Here /\/\ -->
        </decorations>
    </painter>
</style>
mgarin commented 5 years ago

This is actually a good note, I forgot to add some of the states in the Painter implementation including collapsed/expanded state, I will add those tomorrow for WebCollapsiblePane component and it's sub-components and for WebAccordion.

mgarin commented 5 years ago

I've added expanded, expanding, collapsed and collapsing states support for WebCollapsiblePane and AccordionPane styles and expanding and collapsing states support for header, title label and control buttons (they didn't have those before, only expanded and collapsed ones).

Note that for convenience reasons expanded state is not fully equal expanded state value in according components but instead means that WebCollapsiblePane or AccordionPane are anyhow expanded (even if currently collapsing or expanding).