screen width allocation invalid (using flex or width as %)

VERIFIED INVALID

Status

()

--
minor
VERIFIED INVALID
18 years ago
10 years ago

People

(Reporter: rvj, Assigned: jrgmorrison)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
assume you wish to divide the screen window into two halves, two boxes, one red 
on left and one blue on right.

if the width of a box is allocated using the style attribute with a  percentage 
value, the box width is zero if the box contains no child elements. (50% value 
is ignored)

if the flex element is used, then the box width allocated is not proportional 
for sibling box elements (columns) if the box contains child elements of 
varying widths
(Reporter)

Comment 1

18 years ago
Created attachment 21457 [details]
unable to create a 50-50 split screen (2 boxes) if box contents differ
(Reporter)

Comment 2

18 years ago
PS Alternatively since only the textfield widget seems to allocate screen width 
correctly (50-50), is it possible to remove/hide the textfield inset border to 
achieve the desired affect?

<textfield readonly="true" flex="1" value="01234567890123456789" />
<textfield readonly="true" flex="1" value="0" />

				
	
(Reporter)

Comment 3

18 years ago
Created attachment 21535 [details]
simple test case
(Reporter)

Comment 4

18 years ago
have added a simple test case e.g. upper middle pink seperator is shifted left

Comment 5

18 years ago
Confirmed

Platform: PC
OS: Linux 2.2.16
Mozilla Build: 2001010221


Marking NEW.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: other → All
Hardware: Other → All

Comment 6

18 years ago
->evaughan
Assignee: trudelle → evaughan

Comment 7

18 years ago
->jrgm
Assignee: evaughan → jrgm
(Assignee)

Updated

18 years ago
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID
(Assignee)

Comment 8

18 years ago
You need equalsize. Otherwise the box system is laying out as designed 
(will consume available space). (Marking invalid = not a bug).
http://www.mozilla.org/xpfe/xulref/boxref.html#equalsize

<?xml version="1.0"?>
<window
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  orient="vertical"
>

  <box flex="1" orient="horizontal" equalsize="always">  
    <box flex="1" style="background-color:red; ">  
      <text autostretch="never" value="01234567890123456789" />      
    </box>  
    <box flex="1" style="background-color:blue;">      
      <text autostretch="never" value="01234" />        
    </box> 
  </box> 

</window>

(Assignee)

Comment 9

18 years ago
Hope that helps. Sorry for the slow turnaround.
Status: RESOLVED → VERIFIED

Updated

10 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.