Closed
Bug 295415
Opened 20 years ago
Closed 20 years ago
XUL listboxes too "flexy"
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: readams, Unassigned)
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8b2) Gecko/20050524 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8b2) Gecko/20050524 Firefox/1.0+
If a XUL listbox is in a box with another XUL element, both with flex="1", the
listbox comes out much bigger than the other element.
Testcases to be attached.
Reproducible: Always
Comment 3•20 years ago
|
||
+kw testcase, although i have no idea what i'm meant to be seeing/not seeing here..
Keywords: testcase
The listbox and tree in both examples should be the same size; they're not.
Comment 5•20 years ago
|
||
confirmed with linux trunk 2005052401
==> xul
Status: UNCONFIRMED → NEW
Component: Layout → XP Toolkit/Widgets: XUL
Ever confirmed: true
QA Contact: layout → xptoolkit.xul
Comment 6•20 years ago
|
||
Listboxes have a default size of 200x200. Trees have a default size of 0x0.
(ignoring margins, borders, etc.) Thus the listbox will be 200px larger.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Sorry but this explanation makes no sense. Nothing in any XUL documentation or
specifications leads me to believe that this behavior is correct, and absolutely
every other case works according to the flex attributes.
Why should listboxes be any different, and why should the default size affect
how it works with the flex attribute?
I'm sorry, but this is a bug.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 8•20 years ago
|
||
The default height of the listbox is 200. The default height of the tree is 0.
If the height of the window is 800 pixels, there will be 600 pixels of remaining
space. Since both elements are equally flexible (flex="1"), the remaining space
will be divided equally among both elements, which is 600 divided by 2 = 300
pixels per element. The listbox will become 500 pixels and the tree will be 300
pixels. Which is what I see happening in a recent Firefox build.
OK I think I understand what you're saying, and setting the width and height to
0 works as a workaround. I would put forth however that trees and lists, at
least, should have the same "default" size because
<vbox>
<listbox height="0" flex="1"/>
<tree flex="1"/>
</vbox>
isn't how I, or I believe most people, would expect that to work in order to get
equal-sized boxes.
Comment 10•20 years ago
|
||
You can use
<vbox equalsize="always">
<listbox flex="1"/>
<tree flex="1"/>
</vbox>
if you want the children to be the same size.
I don't see any reason to change the default size of listboxes/trees which have
been in place for a long time, just for this particular circumstance. You
shouldn't be relying on any particular default size for an element anyway since
it may vary by platform/theme.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•