minor visual in switcher
This commit is contained in:
parent
726dd0b992
commit
98e09cbdb3
15
layout.lua
15
layout.lua
|
@ -83,8 +83,9 @@ end
|
||||||
|
|
||||||
local function find_rd(c, regions, lu)
|
local function find_rd(c, regions, lu)
|
||||||
assert(lu ~= nil)
|
assert(lu ~= nil)
|
||||||
local x = regions[lu].x + c.width + c.border_width
|
local x, y
|
||||||
local y = regions[lu].y + c.height + c.border_width
|
x = c.x + c.width + c.border_width
|
||||||
|
y = c.y + c.height + c.border_width
|
||||||
local rd = nil
|
local rd = nil
|
||||||
for i, a in ipairs(regions) do
|
for i, a in ipairs(regions) do
|
||||||
if a.x + a.width > regions[lu].x and a.y + a.height > regions[lu].y then
|
if a.x + a.width > regions[lu].x and a.y + a.height > regions[lu].y then
|
||||||
|
@ -180,6 +181,8 @@ function module.create(name, editor)
|
||||||
log(DEBUG, "Compute regions for " .. c.name)
|
log(DEBUG, "Compute regions for " .. c.name)
|
||||||
lu = find_lu(c, regions)
|
lu = find_lu(c, regions)
|
||||||
if lu ~= nil then
|
if lu ~= nil then
|
||||||
|
c.x = regions[lu].x
|
||||||
|
c.y = regions[lu].y
|
||||||
rd = find_rd(c, regions, lu)
|
rd = find_rd(c, regions, lu)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -234,7 +237,13 @@ function module.create(name, editor)
|
||||||
hh.border_width = c.border_width
|
hh.border_width = c.border_width
|
||||||
rd = find_rd(hh, regions, lu)
|
rd = find_rd(hh, regions, lu)
|
||||||
else
|
else
|
||||||
rd = find_rd(h, regions, lu)
|
local hh = {}
|
||||||
|
hh.x = h.x
|
||||||
|
hh.y = h.y
|
||||||
|
hh.width = h.width
|
||||||
|
hh.height = h.height
|
||||||
|
hh.border_width = c.border_width
|
||||||
|
rd = find_rd(hh, regions, lu)
|
||||||
end
|
end
|
||||||
|
|
||||||
if rd ~= nil then
|
if rd ~= nil then
|
||||||
|
|
|
@ -158,7 +158,7 @@ function module.start(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
if #tablist > 0 then
|
||||||
local a = regions[active_region]
|
local a = regions[active_region]
|
||||||
local pl = api.lgi.Pango.Layout.create(cr)
|
local pl = api.lgi.Pango.Layout.create(cr)
|
||||||
pl:set_font_description(tablist_font_desc)
|
pl:set_font_description(tablist_font_desc)
|
||||||
|
|
Loading…
Reference in New Issue