feat: allow customization of full-border color via theme setting

This commit is contained in:
ocl2go
2024-06-29 21:48:12 +09:00
committed by GitHub
parent 8d1aa6c783
commit eaa682df64

View File

@@ -1,7 +1,6 @@
local function setup() local function setup()
Manager.render = function(self, area) Manager.render = function(self, area)
local c = self:layout(area) local c = self:layout(area)
local bar = function(c, x, y) local bar = function(c, x, y)
if x <= 0 or x == area.w - 1 then if x <= 0 or x == area.w - 1 then
return {} return {}
@@ -13,11 +12,12 @@ local function setup()
):symbol(c) ):symbol(c)
end end
local style = THEME.manager.border_style
return ya.flat { return ya.flat {
-- Borders -- Borders
ui.Border(area, ui.Border.ALL):type(ui.Border.ROUNDED), ui.Border(area, ui.Border.ALL):type(ui.Border.ROUNDED):style(style),
ui.Bar(c[1]:padding(ui.Padding.y(1)), ui.Bar.RIGHT), ui.Bar(c[1]:padding(ui.Padding.y(1)), ui.Bar.RIGHT):style(style),
ui.Bar(c[3]:padding(ui.Padding.y(1)), ui.Bar.LEFT), ui.Bar(c[3]:padding(ui.Padding.y(1)), ui.Bar.LEFT):style(style),
bar("", c[1].right - 1, c[1].y), bar("", c[1].right - 1, c[1].y),
bar("", c[1].right - 1, c[1].bottom - 1), bar("", c[1].right - 1, c[1].bottom - 1),