Thanks Eero. I was instancing barwidget and not marginbox in right_layout.

I thought applying a widget over another meant the properties were
acquired by the widget on which it is applied. Now I understand it is
nesting and not what I had thought.

While the marginbox works, the constrained layout did not work.
-- Mohan Sundaram


On Sat, Apr 26, 2014 at 2:32 PM, Eero-Antero Säisä <e...@jakolasku.fi> wrote:
> Hi,
>
> I'm running awesome v3.5.5 and your snippet below works for me. Are you
> sure that you're adding the margin widget to the wibox instead of the
> barwidget?
>
> right_layout:add(marginbox)
>
> A small screenshot to make sure this is the desired output:
> http://i.imgur.com/JoPtvM1.png
>
> / Eero
>
> On 04/26/2014 11:46 AM, Mohan Sundaram wrote:
>> Behaviour is the same whether I use ticks or height/width
>> specification. The margin layout wibox did not give me margin padding
>> either when applied to the barwidget...
>>
>> Eero - you say it works for you. While your widget specifications are
>> as per 3.5 usage, the margin layout wrapping is 3.4 usage style. Are
>> you using the margin box wrapping in 3.5?
>> -- Mohan Sundaram
>>
>>
>> On Sat, Apr 26, 2014 at 2:11 PM, Mohan Sundaram <mohan....@gmail.com> wrote:
>>> 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ä <e...@jakolasku.fi> 
>>> 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 awesome-unsubscr...@naquadah.org.

Reply via email to