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),
_G_Widget_.line_style(
HEADER_UNDERLINE_THICKNESS, HEADER_UNDERLINE_THICKNESS,
HEADER_UNDERLINE_CAP, _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),
_G_Widget_.line_style(
1, 1,
CAIRO_LINE_CAP_BUTT, _G_Patterns_.BORDER_FG,
_G_Patterns_.BORDER_FG CAIRO_LINE_CAP_BUTT
)
) )
end end

View File

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