Background widget now working
This commit is contained in:
parent
04a8ef5876
commit
95b91a57f7
|
@ -35,8 +35,6 @@ function todo_list_widget(todo, s)
|
|||
|
||||
widget.shape_border_width = 1
|
||||
widget.shape_border_color = "#ffffff"
|
||||
widget.forced_width = todo.width
|
||||
widget.forced_height = todo.height
|
||||
widget.point = { x = todo.x, y = todo.y }
|
||||
|
||||
return widget
|
||||
|
@ -54,10 +52,17 @@ function add_background_widget(s)
|
|||
|
||||
todo = json.parse(content)
|
||||
|
||||
local margin = 25
|
||||
|
||||
local l = wibox.layout {
|
||||
layout = wibox.layout.manual
|
||||
homogeneous = true,
|
||||
spacing = margin,
|
||||
forced_num_cols = 3,
|
||||
layout = wibox.layout.grid,
|
||||
}
|
||||
|
||||
l:set_orientation('horizontal')
|
||||
|
||||
local widgets = {}
|
||||
|
||||
for key, val in pairs(todo) do
|
||||
|
@ -71,7 +76,7 @@ function add_background_widget(s)
|
|||
})
|
||||
|
||||
background_widget:setup {
|
||||
l,
|
||||
wibox.container.margin(l, margin, margin, margin, margin),
|
||||
layout = wibox.layout.manual
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue