[ 
https://issues.apache.org/jira/browse/PIVOT-721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428235#comment-13428235
 ] 

Sandro Martini commented on PIVOT-721:
--------------------------------------

With the additional data (thanks to the debug-only patch), now I see that when 
running the latest version of pivot_721_test2.bxml , you can see that if I set 
a  preferredHeight in BoxPane, images won't be scaled up, even if fill=true .

This is due to some calculations done by BoxPaneSkin, depending on the 
orientation it takes the width or the height of the image as desired value, 
this is the reason because it won't scale up the image.

As a workaround, you can set preferredWidth/preferredHeight as with container 
preferredHeight/preferredWidth just set (for example), to see the image scale 
up ...

More details will follow, but at this point I think that to avoid problems, we 
can write more info, and add another test file: 
pivot_721_test2_with_workaround.bxml to show how it's possible to make it work 
...

Tell me what you think.

                
> ButtonDataRenderer#setFillIcon has no effect, because its BoxPane doesn't 
> have fill style
> -----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-721
>                 URL: https://issues.apache.org/jira/browse/PIVOT-721
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: Bill van Melle
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.3
>
>         Attachments: pivot721_imageview_only_for_debug_DO_NOT_COMMIT.patch
>
>
> ButtonDataRenderer has a setFillIcon method, which supposedly should allow 
> the button's image to be scaled to fit the button.  However, it has no 
> effect, because the renderer is a BoxPane with the default fill=false.
> Fix: In the ButtonDataRenderer constructor, add
>     getStyles().put("fill", true);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to