Better transparancy for top panel arrows

This commit is contained in:
Thomas Avé 2022-07-25 18:48:49 +02:00
parent 8b9e1eda07
commit 1e3cda014d
3 changed files with 19 additions and 16 deletions

View File

@ -9,20 +9,22 @@ local dpi = beautiful.xresources.apply_dpi
local function powerline(widget, bgcolor, adjacentcolor, right)
right = right or false
local container = {
layout = wibox.layout.fixed.horizontal,
wibox.layout.margin(widget, dpi(6), dpi(10)),
}
if (not right) then
table.insert(container, lain.util.separators.arrow_left(bgcolor, adjacentcolor))
else
table.insert(container, lain.util.separators.arrow_right(bgcolor, adjacentcolor))
end
local arrow = right and lain.util.separators.arrow_right or lain.util.separators.arrow_left
-- if (not right) then
-- table.insert(container, )
-- else
-- table.insert(container, )
-- end
return wibox.widget{
{
container,
bg = bgcolor,
widget = wibox.container.background
layout = wibox.layout.fixed.horizontal,
{
wibox.layout.margin(widget, dpi(6), dpi(10)),
bg = bgcolor,
widget = wibox.container.background
},
arrow(bgcolor, adjacentcolor)
},
top = 0, bottom = 0, left = 0, right = 0,
widget = wibox.container.margin

View File

@ -73,6 +73,7 @@ theme.tasklist_fg_normal = theme.fg_normal
-- Panel Sizing
theme.top_panel_height = dpi(30)
theme.top_panel_powerline = "#002F5F"
theme.top_panel_minimized = "#12151c"
-- Notification Sizing
theme.notification_max_width = dpi(350)

View File

@ -86,12 +86,12 @@ local function list_update(w, buttons, label, data, objects)
ll:add(cbm)
if (index % 2 == 0) then
local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.top_panel_powerline
local main_color = o.minimized and "#12151c" or theme.bg_normal
local end_color = (count == index or objects[index+1].minimized) and "" or theme.top_panel_powerline
local main_color = o.minimized and theme.top_panel_minimized or theme.bg_normal
bgb:set_widget(pl(ll, main_color, end_color, true))
else
local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.bg_normal
local main_color = o.minimized and "#12151c" or theme.top_panel_powerline
local end_color = (count == index or objects[index+1].minimized) and "" or theme.bg_normal
local main_color = o.minimized and theme.top_panel_minimized or theme.top_panel_powerline
bgb:set_widget(pl(ll, main_color, end_color, true))
end