Open Bug 296515 Opened 20 years ago Updated 2 years ago

Allow <checkbox> with cropped label

Categories

(Core :: XUL, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: marek, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)

Currently there is no way to crop checkbox's label. I propose to make a new
binding (for example checkbox-crop-label):

  <binding id="checkbox-crop-label"
extends="chrome://global/content/bindings/checkbox.xml#checkbox">
    <content>
      <xul:image class="checkbox-check" xbl:inherits="checked,disabled"/>
      <xul:hbox class="checkbox-label-box" flex="1">
        <xul:image class="checkbox-icon" xbl:inherits="src"/>
        <xul:label class="checkbox-label"
xbl:inherits="value=label,accesskey,crop" flex="1"/>
      </xul:hbox>
    </content>
  </binding>

And in the global/xul.css:

checkbox[crop] { -moz-binding:
url("chrome://global/content/bindings/checkbox.xml#checkbox-crop-label");
}

The same thing should be done for <radio> widget.
 

Reproducible: Always

Steps to Reproduce:
1.<checkbox flex="1" label="this text should be cropped if no free space..."
crop="end"/>
2.
3.

Actual Results:  
The label is not cropped, it is wrapped.

Expected Results:  
The label should be cropped.
Summary: <checkbox> with cropped label → Allow <checkbox> with cropped label
Assignee: jag → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.