Add bg/fg pattern support
This commit is contained in:
parent
1a03ad281a
commit
e8027779dc
|
@ -88,6 +88,7 @@ local function setup_drawable(data)
|
|||
internal.w.ontop = true
|
||||
internal.margin:set_widget(internal.layout)
|
||||
internal.w:set_widget(internal.margin)
|
||||
internal.w:set_fg(data.fg)
|
||||
|
||||
--Getters
|
||||
get_map.wibox = function() return internal.w end
|
||||
|
|
|
@ -14,7 +14,7 @@ local function draw(data,item,is_focussed,is_pressed)
|
|||
if is_focussed then
|
||||
item.widget:set_bg(data.bg_focus)
|
||||
else
|
||||
item.widget:set_bg(data.bg)
|
||||
item.widget:set_bg(nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -293,6 +293,7 @@ local function new(data)
|
|||
if not data.visible then return 1,1 end
|
||||
local result,r2 = wibox.layout.fixed.fit(a1,99999,99999)
|
||||
local total = data._total_item_height
|
||||
print("salut",compute_geo(data))
|
||||
return compute_geo(data)
|
||||
end
|
||||
real_l.add = function(real_l,item)
|
||||
|
|
|
@ -53,7 +53,7 @@ end
|
|||
|
||||
local function set_direction(data,direction)
|
||||
local geometry = (direction == "left" or direction == "right") and {width = data.wibox.height, height = data.wibox.width} or {height = data.wibox.height, width = data.wibox.width}
|
||||
local top_clip_surface = do_gen_menu_top(data,geometry.width,geometry.height,10,data.border_width,{bg=beautiful.fg_normal or "#0000ff",fg=beautiful.bg_normal or "#00ffff"})
|
||||
local top_clip_surface = do_gen_menu_top(data,geometry.width,geometry.height,10,data.border_width,{bg=beautiful.fg_normal or "#0000ff",fg=data.bg or "#00ffff"})
|
||||
local top_bounding_surface = do_gen_menu_top(data,geometry.width,geometry.height,10,0,{bg="#00000000",fg="#ffffffff"})
|
||||
|
||||
local arr_margin,angle,mar_func = (data.arrow_type == base.arrow_type.NONE) and 0 or 13,0
|
||||
|
|
Loading…
Reference in New Issue