reorganization
This commit is contained in:
@@ -17,9 +17,9 @@ function on_resume()
|
||||
|
||||
for idx,widget in ipairs(widgets) do
|
||||
if aio:is_widget_added(widget) then
|
||||
colors[idx] = "#f44336"
|
||||
colors[idx] = md_colors.red_500
|
||||
else
|
||||
colors[idx] = "#388e3c"
|
||||
colors[idx] = md_colors.green_500
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,10 +31,10 @@ function on_click(idx)
|
||||
|
||||
if aio:is_widget_added(widget) then
|
||||
aio:remove_widget(widget)
|
||||
colors[idx] = "#388e3c"
|
||||
colors[idx] = md_colors.green_500
|
||||
else
|
||||
aio:add_widget(widget)
|
||||
colors[idx] = "#f44336"
|
||||
colors[idx] = md_colors.red_500
|
||||
end
|
||||
|
||||
ui:show_buttons(buttons, colors)
|
||||
|
||||
Reference in New Issue
Block a user