Closed sebthom closed 9 years ago
Im not at a computer at the moment but i think this can be done with styles, ill get more details when im back on monday.
That said i think you are right though, an explicit xml property seems nicer also. Ill take a look on monday.
Cheers
ok, so there are some new properties in v1.7.20 on haxelib:
iconWidth
iconHeight
These can be used in either xml or css, heres a working example: http://haxeui.org/try.jsp?layoutId=LoXk5Ep
<?xml version="1.0" encoding="utf-8"?>
<vbox id="main" style="padding:5;">
<scrollview width="400" height="400">
<hbox>
<vbox>
<button text="Test" icon="img/slinky_tiny.jpg" iconWidth="100"/>
<button text="Test" icon="img/slinky_tiny.jpg" iconHeight="100" />
<button text="Test" icon="img/slinky_tiny.jpg" iconWidth="50" iconPosition="right" />
<button text="Test" icon="img/slinky_tiny.jpg" iconHeight="50" iconPosition="top" />
<button text="Test" icon="img/slinky_tiny.jpg" iconWidth="100" iconHeight="100" />
<button text="Test" icon="img/slinky_tiny.jpg" iconWidth="50" iconHeight="50" iconPosition="bottom" />
</vbox>
<vbox>
<button text="Test" style="icon:img/slinky_tiny.jpg; iconWidth:100;" />
<button text="Test" style="icon:img/slinky_tiny.jpg; iconHeight:100;" />
<button text="Test" style="icon:img/slinky_tiny.jpg; iconWidth:50; iconPosition:right" />
<button text="Test" style="icon:img/slinky_tiny.jpg; iconHeight:50; iconPosition:top" />
<button text="Test" style="icon:img/slinky_tiny.jpg; iconWidth:100; iconHeight:100;" />
<button text="Test" style="icon:img/slinky_tiny.jpg; iconWidth:50; iconHeight:50; iconPosition:bottom" />
</vbox>
</hbox>
</scrollview>
</vbox>
Awesome. Thanks!
Please add an option that allows the specification of the height/width properties for the button icon in XML.
E.g.
Or something like: