Closed Bug 263968 Opened 20 years ago Closed 20 years ago

Labels in hboxs don't crop

Categories

(Core :: XUL, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: agilmore, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

As shown in the testcase, a label set to crop will not crop while in a hbox, but
will do so in a vbox.

Reproducible: Always
Steps to Reproduce:
1.  Open test case
2.  Reduce the size of the Window so neither of the labels can be entirely shown
3.  
Actual Results:  
The first label will not crop while the second one will.


Expected Results:  
Both labels should crop evenly.  As they do if you make the hbox containing the
first label a vbox in the testcase.

Tested on FF 0.9.1 and 0.10.1 on Windows 2000 & Linux.
Reduce the size of the window so the labels cannot be entirely shown, notice
the first label will not crop, while the second will.
Neil, should that be cropping?
Minimum box size across the box's direction is obviously the maximum of the
minimum sizes of each of the box's children. However, the minimum box size along
the box's direction depends on whether the children are flexible or not. When
the children are flexible then their minimum sizes are added but when they are
inflexible then their preferred sizes are added. Now the preferred width of a
label is that amount sufficient to display its value, although in the case of a
label with the crop attribute, its minimum width is zero. This means that the
vbox containing that label will also have zero minimum width. However as the
label does not flex the hbox has a minimum width equal to the label's preferred
width so that it is impossible to resize the hbox to force the label to crop.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: