Search code examples
javascriptfirefoxxul

XUL: fit all elements vertically in prefpane


here goes the XUL part of one of the preference panes.

  <prefpane id="alt-about" label="About" image="chrome://alt/skin/about.png">
    <hbox>
        <vbox>
          <image id="alt-about-logo" />
        </vbox>

        <vbox>
          <description id="addonName">Bla bla bla, bla bla</description>
          <description id="version"/>
          <description>Author: bla bla bla</description>
          <description>ICQ: bla</description>
          <description>E-mail: bla@bla.com</description>
          <description>Website: www.bla-bla.com</description>

          <separator class="groove" flex="1"/>
          <description>News feed powered by Bla agency</description>
          <description>Exchange Rates are powered
              by Blaaaa Blaa of Blabla</description>

        </vbox>
    </hbox>
  </prefpane> 

and for some reason the window is not being vertically resized to fit last description element

about box

I tried many attributes, many combinations of vbox/hbox.. same. How to solve it guys?


Solution

  • I'll answer to my own questions after finding it myself.

    There should be no empty elements like this

    <description id="version"/>

    Always put something inside, so Firefox can calculate the size.

    <description id="version">0.0.0</description>