shrink according to gap again
This commit is contained in:
parent
61664bd894
commit
0690f3f84e
16
editor.lua
16
editor.lua
|
@ -10,7 +10,6 @@ local api = {
|
||||||
dpi = require("beautiful.xresources").apply_dpi,
|
dpi = require("beautiful.xresources").apply_dpi,
|
||||||
}
|
}
|
||||||
|
|
||||||
local gap = api.beautiful.useless_gap or 0
|
|
||||||
local label_font_family = api.beautiful.get_font(
|
local label_font_family = api.beautiful.get_font(
|
||||||
api.beautiful.mono_font or api.beautiful.font):get_family()
|
api.beautiful.mono_font or api.beautiful.font):get_family()
|
||||||
local label_size = api.dpi(30)
|
local label_size = api.dpi(30)
|
||||||
|
@ -171,7 +170,7 @@ function start_editor(data)
|
||||||
local msg, ext
|
local msg, ext
|
||||||
|
|
||||||
for i, a in ipairs(closed_areas) do
|
for i, a in ipairs(closed_areas) do
|
||||||
local sa = shrink_area_with_gap(a, gap)
|
local sa = shrink_area_with_gap(a, data.gap)
|
||||||
cr:rectangle(sa.x, sa.y, sa.width, sa.height)
|
cr:rectangle(sa.x, sa.y, sa.width, sa.height)
|
||||||
cr:clip()
|
cr:clip()
|
||||||
cr:set_source(api.gears.color(closed_color))
|
cr:set_source(api.gears.color(closed_color))
|
||||||
|
@ -194,7 +193,7 @@ function start_editor(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, a in ipairs(open_areas) do
|
for i, a in ipairs(open_areas) do
|
||||||
local sa = shrink_area_with_gap(a, gap)
|
local sa = shrink_area_with_gap(a, data.gap)
|
||||||
cr:rectangle(sa.x, sa.y, sa.width, sa.height)
|
cr:rectangle(sa.x, sa.y, sa.width, sa.height)
|
||||||
cr:clip()
|
cr:clip()
|
||||||
if i == #open_areas then
|
if i == #open_areas then
|
||||||
|
@ -507,12 +506,11 @@ function start_editor(data)
|
||||||
if to_apply then
|
if to_apply then
|
||||||
layout = api.layout.get(screen)
|
layout = api.layout.get(screen)
|
||||||
if layout.set_regions then
|
if layout.set_regions then
|
||||||
-- local areas_with_gap = {}
|
local areas_with_gap = {}
|
||||||
-- for _, a in ipairs(closed_areas) do
|
for _, a in ipairs(closed_areas) do
|
||||||
-- areas_with_gap[#areas_with_gap + 1] = shrink_area_with_gap(a, gap)
|
areas_with_gap[#areas_with_gap + 1] = shrink_area_with_gap(a, data.gap)
|
||||||
-- end
|
end
|
||||||
-- layout.set_regions(areas_with_gap)
|
layout.set_regions(areas_with_gap)
|
||||||
layout.set_regions(closed_areas)
|
|
||||||
api.layout.arrange(screen)
|
api.layout.arrange(screen)
|
||||||
end
|
end
|
||||||
api.gears.timer{
|
api.gears.timer{
|
||||||
|
|
Loading…
Reference in New Issue