Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebCollapsiblePane state in style #552

Closed
husker-dev opened this issue Sep 30, 2019 · 2 comments
Closed

WebCollapsiblePane state in style #552

husker-dev opened this issue Sep 30, 2019 · 2 comments

Comments

@husker-dev
Copy link

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 mgarin self-assigned this Sep 30, 2019
@mgarin mgarin added this to the v1.2.11 milestone Sep 30, 2019
@mgarin
Copy link
Owner

mgarin commented Sep 30, 2019

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 added a commit that referenced this issue Oct 1, 2019
- CollapsiblePanePainter.java - Added `expanded`, `expanding`, `collapsed` and `collapsing` states support for style
- AbstractHeaderPanel.java, AbstractTitleLabel.java, AbstractControlButton.java - Added `expanding` and `collapsing` states support for style
- collapsiblepane.xml - Simplified default style

Accordion [ #552 ]
- AccordionPane.java - Added `expanded`, `expanding`, `collapsed` and `collapsing` states support for style

Styling
- AbstractDecorationPainter.java - Minor code optimizations and refactoring
- DecorationState.java - Added `expanding` and `collapsing` default states
@mgarin
Copy link
Owner

mgarin commented Oct 1, 2019

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).

@mgarin mgarin closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants