Open Bug 113696 Opened 23 years ago Updated 2 years ago

Grid alignment not working

Categories

(Core :: XUL, defect)

x86
Windows NT
defect

Tracking

()

mozilla1.2alpha

People

(Reporter: cmessenger, Unassigned)

Details

(Whiteboard: [xul1.0-layout-grid])

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6) Gecko/20011120
BuildID:    2001112009

If I make a 2-column grid, and want the items in the first column to be
right-aligned, the following should work (according to David Hyatt):

<grid>
    <columns>
        <column pack="end"/>
        <column/>
    </columns>
    <rows>
        <row>
            <description value="cat"/>
            <description value="C"/>
        </row>
        <row>
            <description value="elephant"/>
            <description value="E"/>
        </row>
        <row>
            <description value="fish"/>
            <description value="F"/>
        </row>
    </rows>
</grid>

It doesn't work.
This is a full .xul file demonstrating the problem
Yep, that should have caused the cells in column one to stop stretching and to
right align.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 70753
Whiteboard: [xul1.0-layout-grid]
Actually I think this should be align="end" on the column now that I think about
it.  That doesn't work either though, right?
Correct -- align="end" didn't work either.
Comment on attachment 60529 [details]
Shows grid alignment not working

Changing mimetype of testcase to XUL Mimetype
Attachment #60529 - Attachment mime type: text/plain → application/vnd.mozilla.xul+xml
Keywords: mozilla1.0+
Moving non nsbeta1+ XUL 1.0 bugs to mozilla1.2
Target Milestone: --- → mozilla1.2
No longer blocks: 70753
Keywords: mozilla1.0+mozilla1.0-
->XUL
Assignee: eric → hyatt
Component: Layout → XP Toolkit/Widgets: XUL
QA Contact: petersen → shrir
This bug is about align="stretch" not stretching so that a column can have a
maxheight with a scrollbar unless user stretches the window and then the column
should stretch too until the scrollbars are not needed anymore. If window is
made smaller part of the scrollbar disappears too.

If I delete maxheight the scrollbar never appears when the windows becomes
smaller.

I have also reported align bug with a button label, it only worked when the
<label> was written out explicitly.

And yes I can confirm this grid align bug too with ff 1.0.1.

I had similar but somewhat different problems with mozilla too but did not test
with the latest version.
I may be missing something essential here, but the attachment 60529 [details] looks
completely off target to me.
The DOM created by this XUL markup creates the view by laying out *rows* - so to
achieve a specific column width each of the rows elements has to have a specific
width, thus align="end" doesn't make any sense because each element in the first
column has (to have) the same width!
If align="end" should have any impact on such grid columns like here, it should
have to create special cell elements that inherit such aligned and have the
description elements used here as children, maybe by XBL.

Actually, I'd consider the bug as filed to be invalid with regard to the way XUL
works.
FYI, what I have noticed is that align only works on the parent of the element,
whether that be the row or the column, while pack does not work at all.

It would be more useful for align to work both on the row and the column, as you
tend to want to align a column of (say) numbers to the right, while most people
find they want to align rows centrally (which at least already works).
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
Assignee: hyatt → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: