2021-01-23 23:04:22 +01:00
|
|
|
local gears = require("gears")
|
|
|
|
|
2022-07-23 10:36:44 +02:00
|
|
|
local shape = {}
|
2021-01-23 23:04:22 +01:00
|
|
|
|
|
|
|
-- Create rounded rectangle shape (in one line)
|
|
|
|
|
|
|
|
function shape.rrect(radius)
|
|
|
|
return function(cr, width, height)
|
|
|
|
gears.shape.rounded_rect(cr, width, height, radius)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Create partially rounded rect
|
|
|
|
|
|
|
|
function shape.prrect(radius, tl, tr, br, bl)
|
|
|
|
return function(cr, width, height)
|
2021-08-27 20:01:22 +02:00
|
|
|
gears.shape.partially_rounded_rect(
|
|
|
|
cr,
|
|
|
|
width,
|
|
|
|
height,
|
|
|
|
tl,
|
|
|
|
tr,
|
|
|
|
br,
|
|
|
|
bl,
|
|
|
|
radius
|
|
|
|
)
|
2021-01-23 23:04:22 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return shape
|