REF use line style argument

This commit is contained in:
Nathan Dwarshuis 2021-07-10 23:07:27 -04:00
parent 7bff2e5885
commit 03add92fdd
3 changed files with 31 additions and 22 deletions

2
core

@ -1 +1 @@
Subproject commit 689de54a962b7e1960859e214103ee50c67ee153 Subproject commit 927f508765e79508b7520d12d2e6467dab175a08

View File

@ -95,11 +95,13 @@ M.Header = function(x, y, w, s)
-- cap = HEADER_UNDERLINE_CAP -- cap = HEADER_UNDERLINE_CAP
-- } -- }
underline = _G_Widget_.Line( underline = _G_Widget_.Line(
{x = x, y = underline_y}, _G_Widget_.make_point(x, underline_y),
{x = x + w, y = underline_y}, _G_Widget_.make_point(x + w, underline_y),
HEADER_UNDERLINE_THICKNESS, _G_Widget_.line_style(
HEADER_UNDERLINE_CAP, HEADER_UNDERLINE_THICKNESS,
_G_Patterns_.HEADER_FG _G_Patterns_.HEADER_FG,
HEADER_UNDERLINE_CAP
)
) )
} }
@ -320,11 +322,13 @@ M.initSeparator = function(x, y, w)
-- line_pattern = _G_Patterns_.BORDER_FG, -- line_pattern = _G_Patterns_.BORDER_FG,
-- } -- }
return _G_Widget_.Line( return _G_Widget_.Line(
{x = x, y = y}, _G_Widget_.make_point(x, y),
{x = x + w, y = y}, _G_Widget_.make_point(x + w, y),
1, _G_Widget_.line_style(
CAIRO_LINE_CAP_BUTT, 1,
_G_Patterns_.BORDER_FG _G_Patterns_.BORDER_FG,
CAIRO_LINE_CAP_BUTT
)
) )
end end

View File

@ -59,17 +59,22 @@ local _BAR_Y_ = _SEP_Y_ + _SEPARATOR_SPACING_
-- } -- }
local bars = _G_Widget_.CompoundBar( local bars = _G_Widget_.CompoundBar(
_G_INIT_DATA_.RIGHT_X + _BAR_PAD_, _G_Widget_.make_point(
_BAR_Y_, _G_INIT_DATA_.RIGHT_X + _BAR_PAD_,
_G_INIT_DATA_.SECTION_WIDTH - _BAR_PAD_, _BAR_Y_
_SPACING_, ),
FS_NUM, _G_INIT_DATA_.SECTION_WIDTH - _BAR_PAD_,
12, _G_Widget_.line_style(
false, 12,
Patterns.INDICATOR_BG, Patterns.INDICATOR_BG,
Patterns.INDICATOR_FG_PRIMARY, CAIRO_LINE_JOIN_MITER
Patterns.INDICATOR_FG_CRITICAL, ),
0.8 _SPACING_,
FS_NUM,
false,
Patterns.INDICATOR_FG_PRIMARY,
Patterns.INDICATOR_FG_CRITICAL,
0.8
) )
-- local labels = _G_Widget_.TextColumn{ -- local labels = _G_Widget_.TextColumn{