pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject ImageView messes up nested inside two TablePanes
Date Thu, 17 Feb 2011 00:27:22 GMT
The behavior I see is that the image is displaced downward from where it
belongs, sometimes so far as to not be visible at all, other times merely
chopping off the bottom of the image.  For any particular image, the
displacement seems to always be the same, no matter in what order I fetch
the images from the server, as though it's dependent on the content of the
image.  I first noticed this with a Tooltip, and thought it might have
something to do with that, but that was a red herring.

Here's a simple example.  This is a TablePane with two columns.  In the
first column, I demonstrate the bug by placing a TablePane in the cell, and
within that an ImageView.  In the second column I place the same ImageView
unnested, which displays correctly.

<Window title="Line Item Tooltip Example" maximized="true"
  <Window title="Images Example" maximized="true"
  xmlns:bxml="http://pivot.apache.org/bxml"
  xmlns="org.apache.pivot.wtk">
  <TablePane styles="{verticalSpacing:1, showHorizontalGridLines:true,
    horizontalSpacing:1, showVerticalGridLines:true}">
    <columns>
      <TablePane.Column width="1*" />
      <TablePane.Column width="1*" />
    </columns>
    <TablePane.Row height="90">
      <TablePane>
        <columns>
          <TablePane.Column width="90" />
          <TablePane.Column width="1*" />
        </columns>
        <TablePane.Row>
          <ImageView image="@test1.jpg" styles="{fill:true}" />
        </TablePane.Row>
      </TablePane>
      <ImageView image="@test1.jpg" styles="{fill:true}" />
    </TablePane.Row>
    <TablePane.Row height="90">
      <TablePane>
        <columns>
          <TablePane.Column width="90" />
          <TablePane.Column width="1*" />
        </columns>
        <TablePane.Row>
          <ImageView image="@test2.jpg" styles="{fill:true}" />
        </TablePane.Row>
      </TablePane>
      <ImageView image="@test2.jpg" styles="{fill:true}" />
    </TablePane.Row>
    <TablePane.Row>
      <Label TablePane.columnSpan="2" text = "The bottom"/>
    </TablePane.Row>
  </TablePane>
</Window>

The particular images I used I just grabbed from a google image search.  I
can send them to you, but I'll bet you can substitute any jpg's of your own
you have lying around that are larger than 90x90.  I also realized one more
thing, which might be a clue: not only are the images in the first column
displaced downward, but also the {fill:true} style is not being honored.

Mime
View raw message