I tried this.
-- Create a progress bar widget
barwidget = awful.widget.progressbar()
barwidget:set_color("#00ff00")
barwidget:set_background_color("#000000")
barwidget:set_border_color("#00ff00")
barwidget:set_vertical(false)
barwidget:set_width(40)
barwidget:set_height(12)
barwidget:set_value(0.5)
-- const = wibox.layout.constraint()
-- const:set_strategy("exact")
-- const:set_height(8)
-- const:set_width(40)
-- const:set_widget(barwidget)
marginbox = wibox.layout.margin()
marginbox:set_margins(5)
marginbox:set_widget(barwidget)
No change in how the widget appears.
-- Mohan Sundaram
On Sat, Apr 26, 2014 at 1:37 PM, Eero-Antero Säisä <[email protected]> wrote:
> Hello,
>
> You can wrap the progressbar inside wibox.layout.margin which will give
> you a nice margin. Honestly I never read the API documentation an I'm
> just guessing how things work. Would be nice if someone could tell why
> the height property in progressbar has no effect. Maybe it has something
> to do with the layout? I don't know.
>
> However here's the code that works for me:
>
> local volumebar = awful.widget.progressbar()
> volumebar:set_background_color(beautiful.bg_focus)
> volumebar:set_color(beautiful.fg_focus)
> volumebar:set_ticks(true)
> volumebar:set_ticks_size(5)
> volumebar:set_width(59)
>
> -- item, left, right, top, bottom? can't find the constructor in the API
> documentation so I'm just guessing..
> local widget = wibox.layout.margin(volumebar, 5, 5, 6, 6)
>
> / Eero
>
> On 04/25/2014 05:07 PM, Mohan Sundaram wrote:
>> Using Awesome 3.5.2 on Ubuntu 14.04.
>>
>> a) The API document seems to describe older API format where widget
>> name is passed as an argument. Is there a place where the new format
>> is described?
>>
>> b) Trying to use the progressbar widget as under
>>
>> barwidget=awful.widget.progressbar()
>> barwidget:set_vertical(false)
>> barwidget:set_width(40)
>> barwidget:set_height(8)
>> barwidget:set_border_color("#00ff00")
>> barwidget:set_background_color("#000000")
>> barwidget:set_color("#00ff00")
>> barwidget:set_value(0.5)
>>
>> Added widget in the wibox
>> right_layout:add(barwidget)
>>
>> I'm getting a progressbar box covering the full height of the systray
>> wibox. Changing the height has no effect. Changing all othe
>> rparameters using Mod+x to run lua code works as documented.
>>
>> Where am I making the mistake? Or is this a bug?
>>
>> -- Mohan Sundaram
>>
--
To unsubscribe, send mail to [email protected].