Glamour Accordion arrangement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Glamour Accordion arrangement

Guillermo Polito
Hi!

Mainly to Doru I think, How difficult is to have horizontal Accordion arrangement in glamour?

I've hacked a bit in adding the commented lines:

GLMMorphicAccordionRenderer>>render: aPresentation
    | presentations container expander |
    presentations := aPresentation matchingPresentations.
    presentations isEmpty ifTrue: [ ^ GLMMorphic emptyMorph ].
    presentations size = 1 ifTrue: [ ^ self renderWithToolbar: presentations first ].
    container := GLMMorphic containerMorph.
    container changeTableLayout.
    "container listDirection: #leftToRight."
    presentations do: [ :each |
        expander := self theme
            newExpanderIn: container
            label: (self titleOrIconOf: each in: container)
            forAll: {(self renderWithToolbar: each)}.
        "expander listDirection: #leftToRight."
        container addMorphBack: expander.
        (aPresentation pane lastActivePresentation notNil and: [
            each title = aPresentation pane lastActivePresentation title ]) ifTrue: [
                expander expanded: true]].
    (aPresentation pane lastActivePresentation isNil and: [container submorphs notEmpty]) ifTrue: [
        container submorphs first expanded: true].
    ^ container

But the expanders just look ugly ugly :)

Other IDEs, when you collapse a widget just keep an icon without the label.

Should I open an issue?
Guille

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Accordion arrangement

Tudor Girba-2
Hi,

In short, the difficulty depends on Morphic. If you provide the magic incantations (to have vertical bars, nice collapsing possibilities etc), I can integrate them :)

Cheers,
Doru


On 6 Jan 2012, at 04:25, Guillermo Polito wrote:

> Hi!
>
> Mainly to Doru I think, How difficult is to have horizontal Accordion arrangement in glamour?
>
> I've hacked a bit in adding the commented lines:
>
> GLMMorphicAccordionRenderer>>render: aPresentation
>     | presentations container expander |
>     presentations := aPresentation matchingPresentations.
>     presentations isEmpty ifTrue: [ ^ GLMMorphic emptyMorph ].
>     presentations size = 1 ifTrue: [ ^ self renderWithToolbar: presentations first ].
>     container := GLMMorphic containerMorph.
>     container changeTableLayout.
>     "container listDirection: #leftToRight."
>     presentations do: [ :each |
>         expander := self theme
>             newExpanderIn: container
>             label: (self titleOrIconOf: each in: container)
>             forAll: {(self renderWithToolbar: each)}.
>         "expander listDirection: #leftToRight."
>         container addMorphBack: expander.
>         (aPresentation pane lastActivePresentation notNil and: [
>             each title = aPresentation pane lastActivePresentation title ]) ifTrue: [
>                 expander expanded: true]].
>     (aPresentation pane lastActivePresentation isNil and: [container submorphs notEmpty]) ifTrue: [
>         container submorphs first expanded: true].
>     ^ container
>
> But the expanders just look ugly ugly :)
>
> Other IDEs, when you collapse a widget just keep an icon without the label.
>
> Should I open an issue?
> Guille
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Reasonable is what we are accustomed with."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev