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

Already on GitHub? Sign in to your account

Accordion custom initialization doesn't paint the 1st item #725

Closed
Titousensei opened this Issue Oct 8, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

Titousensei commented Oct 8, 2012

Initializing the collapse value of the AccordionItems will paint the first titlebar of the item only if the un-collapsed item is the first. If an item other than the first one is set to collapse=false, the first item will not be painted. (However, it is clickable). Same with setting the collapse value with code.

Accordion:
    orientation: 'vertical'

    AccordionItem:
        title: "a1"
        collapse: True
        Label:
            text: "A1"

    AccordionItem:
        title: "a2"
        collapse: True
        Label:
            text: "A2"

    AccordionItem:
        title: "a3"
        collapse: False
        Label:
            text: "A3"

Note: I'm assuming this is the right way to act on AccordionItems programmatically. If an other method should be used, please let me know.

Owner

tshirtman commented Oct 8, 2012

Confirmed

Owner

tshirtman commented Oct 8, 2012

In fact, the real issue is more visible with such a kv:

BoxLayout:
    orientation: 'vertical'
    Widget:

    Accordion:
        orientation: 'vertical'

        AccordionItem:
            title: "a1"
            collapse: True
            Label:
                text: "A1"

        AccordionItem:
            title: "a2"
            collapse: True
            Label:
                text: "A2"

        AccordionItem:
            title: "a3"
            collapse: False
            Label:
                text: "A3"

The widget doesn't manage the collapsed state of the first element correctly.

Owner

tshirtman commented Oct 8, 2012

If you can confirm this resolve the issue for you, please close the issue, thanks for reporting it!

Contributor

Titousensei commented Oct 8, 2012

Yup, this solves it. Thanks for the quick fix!

@Titousensei Titousensei closed this Oct 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment