<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://xtrastuff/locale/xtrastuff.dtd">
<!--
 Translation of the above 'Document Type Declaration' ('DTDec'):
 DOCTYPE:	The 'doctype', or set of markup declarations that provide a grammar (element types, entities, etc.) for
 			this class of documents.
 overlay:	Specifies the root element of this document; here, it has the tagname 'overlay'.  Although somewhat redundant,
 			this MUST match the tagname of the root element of this document.  This root element will usually appear shortly
 			after the DOCTYPE declaration.
 SYSTEM:	Says that the following string is a reference to a local, or 'system' file.  An alternative to this is to
 			reference a 'formal public identifier', for which you would use the keyword 'PUBLIC'.
 "...":		Is the file (or identifier) being referenced; here, the referenced file contains entities with appropriate
 			locale strings.
-->

<window	title="Width test dialog"
		style="overflow:auto;"
		xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
		
		<!-- Container, to be able to have scrollbars for the window's content, if desired. -->
		<box orient="vertical" style="overflow:auto;" flex="1">
			<label>Case 1: Inflexible</label>
			<hbox style="background-color:#ff0000;">
				<description style="background-color:#00ff00;">Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text</description>
				<spacer flex="1"/>
			</hbox>
			
			<spacer style="height:4em;"/>
			
			<label>Case 2: With flex="0" (still inflexible)</label>
			<hbox style="background-color:#ff0000;">
				<description flex="0" style="background-color:#00ff00;">Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text</description>
				<spacer flex="1"/>
			</hbox>
			
			<spacer style="height:4em;"/>
			
			<label>Case 3: With flex="2" (eats up 2/3rds the remaining space)</label>
			<hbox style="background-color:#ff0000;">
				<description flex="2" style="background-color:#00ff00;">Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text</description>
				<spacer flex="1"/>
			</hbox>
			
			<spacer style="height:4em;"/>
			
			<label>Case 4: With flex="1" (eats up half the remaining space)</label>
			<hbox style="background-color:#ff0000;">
				<description flex="1" style="background-color:#00ff00;">Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text</description>
				<spacer flex="1"/>
			</hbox>
			
			<spacer style="height:4em;"/>
			
			<label>Case 5: With flex="1" and spacer flex="99999" (sort of works, but is a semantically nasty hack.  Eats up 1/100000th the remaining space)</label>
			<hbox style="background-color:#ff0000;">
				<description flex="1" style="background-color:#00ff00;">Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text</description>
				<spacer flex="99999"/>
			</hbox>
		</box>
</window>
