Issue 577 in moose-technology: ChildrenShape does not get centered

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

Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology
Status: New
Owner: ----
CC: [hidden email]
Labels: Type-Defect Priority-Medium Component-Mondrian Milestone-4.4

New issue 577 by [hidden email]: ChildrenShape does not get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

I am trying to align a ChildrenShape to the center of a column, but it does  
not work.

On the other hand, a simple rectangle looks like it works fine. In the  
below example, both the top row and the bottom one should be centered:

view shape form: [:builder |
        builder column; pref; center; fill;
                        row; fill;
                        row; fill.
        builder x:1 y:1 add: (MORectangleShape new text: #asString).
        builder x:1 y:2 add: (MORectangleShape new).
        builder x:1 y:2 add: (MOChildrenShape new) ].
view nodes: #('label longer than the children' 'smal') forEach: [ :each |
        view nodes: #(1 2 3 4) ].


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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology

Comment #1 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

I think all the pieces are there. But I need more info about what: #pref,  
#center and #fill do.
Can you give a short description for each of them? I will use your answer  
to write new examples and class documentation. Are some of them  
incompatible? Is #center and #fill not incompatible? If I want a component  
to fill all the space, how can I want it to be in the center?



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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology

Comment #2 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

http://scg.unibe.ch/archive/masters/Meye06b.pdf - page 29-30

"The keyword fill indicates that a shape should take up all available space  
in a cell even if the width or height of the cell is larger than the shapes  
preferred width or height, with pref we tell the layout manager that the  
shapes preferred size should be considered if possible and with grow we  
specify that a row or column should take up all the available space that is  
left at the end of the layouting process."

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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology

Comment #3 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

I added this in the class comment of MOFormsBuilder.
As far as I understand the comment, #center is meaningless when using #fill.
#fill means that a shape take up all the available space, so there is  
nothing to center. Am i missing something?

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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology

Comment #4 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

That is true. I pasted the wrong example. Here is the good one:


view shape form: [:builder |
        builder column; pref; center;
                        row; fill;
                        row; fill.
        builder x:1 y:1 add: (MORectangleShape new text: #asString; withoutBorder).
        builder x:1 y:2 add: (MOChildrenShape new) ].
view nodes: #('label longer than the children' 'smal') forEach: [ :each |
        view nodes: #(1 2 3 4) ].


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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology

Comment #5 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

this is fixed. 2.65

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

Re: Issue 577 in moose-technology: ChildrenShape does not get centered

moose-technology
Updates:
        Status: Fixed

Comment #6 on issue 577 by [hidden email]: ChildrenShape does not  
get centered
http://code.google.com/p/moose-technology/issues/detail?id=577

(No comment was entered for this change.)

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