pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: ImageView messes up nested inside two TablePanes
Date Thu, 17 Feb 2011 14:01:47 GMT
It could be a bug in TablePane. I just stepped through the code and it appears that the image
view is being given a height of 240 (same as the image height in my test) even though it only
seems to be 90px high on screen. Not sure what might be causing that, or why only 90px would
show even when the actual ImageView size is larger. Todd was the original author of TablePane
- maybe he can take a look.
G

On Feb 16, 2011, at 7:27 PM, Bill van Melle wrote:

> 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