Added padding options
This commit is contained in:
parent
1109a5210b
commit
4240d40592
|
@ -7,6 +7,7 @@ local mylayout = {}
|
||||||
|
|
||||||
mylayout.name = "mstab"
|
mylayout.name = "mstab"
|
||||||
|
|
||||||
|
local tabbar_padding = beautiful.mstab_bar_padding or 0
|
||||||
local tabbar_height = beautiful.mstab_bar_height or 40
|
local tabbar_height = beautiful.mstab_bar_height or 40
|
||||||
local corner_radius = beautiful.mstab_corner_width or beautiful.corner_radius or 0
|
local corner_radius = beautiful.mstab_corner_width or beautiful.corner_radius or 0
|
||||||
local tabbar_font = beautiful.mstab_font or beautiful.font or "Monospace 8"
|
local tabbar_font = beautiful.mstab_font or beautiful.font or "Monospace 8"
|
||||||
|
@ -87,10 +88,10 @@ function update_tabbar(clients, t, top_idx, area, master_area_width, slave_area_
|
||||||
s.tabbar.x = area.x + master_area_width + t.gap
|
s.tabbar.x = area.x + master_area_width + t.gap
|
||||||
s.tabbar.y = area.y + t.gap
|
s.tabbar.y = area.y + t.gap
|
||||||
s.tabbar.width = slave_area_width - 2*t.gap
|
s.tabbar.width = slave_area_width - 2*t.gap
|
||||||
s.tabbar.height = tabbar_height - 2*t.gap
|
s.tabbar.height = tabbar_height
|
||||||
|
|
||||||
if tabbar_orientation == "bottom" then
|
if tabbar_orientation == "bottom" then
|
||||||
s.tabbar.y = area.y + area.height - tabbar_height + t.gap
|
s.tabbar.y = area.y + area.height - tabbar_height - t.gap
|
||||||
end
|
end
|
||||||
|
|
||||||
-- update clientlist
|
-- update clientlist
|
||||||
|
@ -161,7 +162,7 @@ function mylayout.arrange(p)
|
||||||
x = area.x + master_area_width + slave_area_width/4,
|
x = area.x + master_area_width + slave_area_width/4,
|
||||||
y = area.y + tabbar_height + area.height/4,
|
y = area.y + tabbar_height + area.height/4,
|
||||||
width = slave_area_width/2,
|
width = slave_area_width/2,
|
||||||
height = area.height/4 - tabbar_height,
|
height = area.height/4 - tabbar_height - tabbar_padding,
|
||||||
}
|
}
|
||||||
if idx == t.top_idx then
|
if idx == t.top_idx then
|
||||||
g.width = slave_area_width
|
g.width = slave_area_width
|
||||||
|
@ -169,7 +170,7 @@ function mylayout.arrange(p)
|
||||||
g.x = area.x + master_area_width
|
g.x = area.x + master_area_width
|
||||||
g.y = area.y
|
g.y = area.y
|
||||||
if tabbar_orientation == "top" then
|
if tabbar_orientation == "top" then
|
||||||
g.y = g.y + tabbar_height
|
g.y = g.y + tabbar_height + tabbar_padding
|
||||||
else
|
else
|
||||||
g.y = g.y
|
g.y = g.y
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue