At 26.10.2009 22:27:26 at Dominik Bruhn <[email protected]> wrote:
> Hy,
> how do you set the height of a imagebox? The icons always gets streched
> to full height of my bar and I want it only at 1:1 height. I tried:
> mybat_icon = widget({ type = "imagebox"})
> mybat_icon.image = image("icons/battery.png")
> 
> mybat_icon.height = 6 --Does nothing
> mymail_icon:set_height(6) --error
> awful.widget.graph.set_height(mymail_icon, 6) --error
> 
> So how can I do this?

Setting the size of the imagebox is not possible AFAIK. You can set:

mybat_icon.resize = false

That will prevent resizing, but this feature is about to be removed
(unless its proven its needed.. I'm not quite sure right now). Also it
may align your icon to the top which may not be what you want (I'm
not sure about this either - never used the layouts in 3.4 much :).

Another option is to set the margins for the icon like this:

awful.widget.layout.margins[mybat_icon] = {top = 2, bottom = 2}

That should work as expected, except if you resize your wibox, you need
to recalculate it...

HTH
lukash

-- 
To unsubscribe, send mail to [email protected].

Reply via email to