add(bar) Center the taglist widget
Use `expand = 'outside'` on the bar main align layout to correctly center the taglist widget, and use more place containers to align all the widget groups.
This commit is contained in:
parent
4c411d1af0
commit
b1b459d60f
|
@ -176,19 +176,25 @@ function bar.new (screen)
|
|||
{
|
||||
-- Bar content
|
||||
layout = layout_align.horizontal,
|
||||
expand = 'outside',
|
||||
{
|
||||
-- Left side of the bar, box margins
|
||||
widget = container_margin,
|
||||
top = dpi(beautiful.bar_box_margin_y, screen),
|
||||
bottom = dpi(beautiful.bar_box_margin_y, screen),
|
||||
right = dpi(beautiful.bar_box_margin_x, screen),
|
||||
left = dpi(beautiful.bar_box_margin_x, screen),
|
||||
-- Left side of the bar, align on the left
|
||||
widget = container_place,
|
||||
halign = "left",
|
||||
{
|
||||
-- Left widget boxes
|
||||
layout = layout_fixed.horizontal,
|
||||
spacing = dpi(beautiful.bar_box_spacing, screen),
|
||||
my_bar.launcher,
|
||||
my_bar.promptbox
|
||||
-- box margins
|
||||
widget = container_margin,
|
||||
top = dpi(beautiful.bar_box_margin_y, screen),
|
||||
bottom = dpi(beautiful.bar_box_margin_y, screen),
|
||||
right = dpi(beautiful.bar_box_margin_x, screen),
|
||||
left = dpi(beautiful.bar_box_margin_x, screen),
|
||||
{
|
||||
-- Left widget boxes
|
||||
layout = layout_fixed.horizontal,
|
||||
spacing = dpi(beautiful.bar_box_spacing, screen),
|
||||
my_bar.launcher,
|
||||
my_bar.promptbox
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -199,19 +205,24 @@ function bar.new (screen)
|
|||
my_bar.taglist
|
||||
},
|
||||
{
|
||||
-- Right side of the bar, box margins
|
||||
widget = container_margin,
|
||||
top = dpi(beautiful.bar_box_margin_y, screen),
|
||||
bottom = dpi(beautiful.bar_box_margin_y, screen),
|
||||
right = dpi(beautiful.bar_box_margin_x, screen),
|
||||
left = dpi(beautiful.bar_box_margin_x, screen),
|
||||
-- Right side of the bar, align on the right
|
||||
widget = container_place,
|
||||
halign = "right",
|
||||
{
|
||||
-- Right widget boxes
|
||||
layout = layout_fixed.horizontal,
|
||||
spacing = dpi(beautiful.bar_box_spacing, screen),
|
||||
my_bar.systray,
|
||||
my_bar.battery,
|
||||
my_bar.textclock
|
||||
-- box margins
|
||||
widget = container_margin,
|
||||
top = dpi(beautiful.bar_box_margin_y, screen),
|
||||
bottom = dpi(beautiful.bar_box_margin_y, screen),
|
||||
right = dpi(beautiful.bar_box_margin_x, screen),
|
||||
left = dpi(beautiful.bar_box_margin_x, screen),
|
||||
{
|
||||
-- Right widget boxes
|
||||
layout = layout_fixed.horizontal,
|
||||
spacing = dpi(beautiful.bar_box_spacing, screen),
|
||||
my_bar.systray,
|
||||
my_bar.battery,
|
||||
my_bar.textclock
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue