This commit is contained in:
Xinhao Yuan 2019-07-07 16:43:54 -04:00
parent f93e2e7f9b
commit 75e42f33e2
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,5 @@
local machi = {
layout = require(".layout"),
layout = require((...):match("(.-)[^%.]+$") .. "layout"),
}
local api = {
@ -20,6 +20,10 @@ local function with_alpha(col, alpha)
return api.lgi.cairo.SolidPattern.create_rgba(r, g, b, alpha)
end
local function max(a, b)
if a < b then return b else return a end
end
local label_font_family = api.beautiful.get_font(
api.beautiful.mono_font or api.beautiful.font):get_family()
local label_size = api.dpi(30)

View File

@ -1,3 +1,11 @@
local function min(a, b)
if a < b then return a else return b end
end
local function max(a, b)
if a < b then return b else return a end
end
--- find the best region for the area-like object
-- @param c area-like object - table with properties x, y, width, and height
-- @param regions array of area-like objects