conky-config/interface/Panel.lua

32 lines
1.2 KiB
Lua
Raw Normal View History

2016-08-11 23:25:56 -04:00
local Widget = require 'Widget'
local FillRect = require 'FillRect'
local left = Widget.Panel{
2017-07-15 20:08:39 -04:00
x = CONSTRUCTION_GLOBAL.LEFT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
width = CONSTRUCTION_GLOBAL.SECTION_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_X * 2,
height = CONSTRUCTION_GLOBAL.SIDE_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
2016-08-11 23:25:56 -04:00
}
local center = Widget.Panel{
2017-07-15 20:08:39 -04:00
x = CONSTRUCTION_GLOBAL.CENTER_LEFT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
width = CONSTRUCTION_GLOBAL.CENTER_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2 + CONSTRUCTION_GLOBAL.CENTER_PAD,
height = CONSTRUCTION_GLOBAL.CENTER_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
2016-08-11 23:25:56 -04:00
}
local right = Widget.Panel{
2017-07-15 20:08:39 -04:00
x = CONSTRUCTION_GLOBAL.RIGHT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
width = CONSTRUCTION_GLOBAL.SECTION_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_X * 2,
height = CONSTRUCTION_GLOBAL.SIDE_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
2016-08-11 23:25:56 -04:00
}
Widget = nil
local draw = function(cr)
FillRect.draw(left, cr)
FillRect.draw(center, cr)
FillRect.draw(right, cr)
end
return draw