dotted_line: Rename set_bg to set_color

This commit is contained in:
elenapan 2024-07-19 09:28:42 +03:00
parent 20c5242017
commit 427865e798
2 changed files with 4 additions and 4 deletions

View file

@ -145,11 +145,11 @@ local update_dotw = function ()
for i=1,7 do
if index_today == i then
dotw_containers[i].bg = x.color0
dotw_separators[i].bg = dotw_colors[i]
dotw_separators[i].color = dotw_colors[i]
dotw_month_day[i].markup = helpers.colorize_text(month_days[i], x.foreground)
else
dotw_containers[i].bg = "#00000000"
dotw_separators[i].bg = x.color0
dotw_separators[i].color = x.color0
dotw_month_day[i].markup = helpers.colorize_text(month_days[i], x.color8)
end
end

View file

@ -44,8 +44,8 @@ dotted_line.new = function(dot_number, dot_size, dot_spacing, orientation)
table.insert(dots, dot)
line:add(dot, helpers.pad[orientation](dot_spacing / 2))
-- This will allow to directly set bg like so `line.bg = some_color`
function line:set_bg(color)
-- This will allow to directly set bg like so `line.color = some_color`
function line:set_color(color)
for index, dot in ipairs(dots) do
dot.bg = color
end