REF use common styles for rect

This commit is contained in:
Nathan Dwarshuis 2021-07-24 00:32:56 -04:00
parent 709845dd8d
commit 97e3b2cf5f
2 changed files with 8 additions and 4 deletions

2
core

@ -1 +1 @@
Subproject commit 532a808bd316237644e763c7af80487fa6a36d8f Subproject commit a1c7f8f49a8db707347b7f1abc15a3c9d64212e0

View File

@ -16,6 +16,7 @@ local TextColumn = require 'TextColumn'
local Line = require 'Line' local Line = require 'Line'
local Timeseries = require 'Timeseries' local Timeseries = require 'Timeseries'
local ScaledTimeseries = require 'ScaledTimeseries' local ScaledTimeseries = require 'ScaledTimeseries'
local s = require 'style'
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- constants -- constants
@ -622,8 +623,8 @@ end
M.default_table_font_spec = M.make_font_spec(FONT, TABLE_FONT_SIZE, false) M.default_table_font_spec = M.make_font_spec(FONT, TABLE_FONT_SIZE, false)
M.default_table_style = Table.style( M.default_table_style = Table.style(
Rect.style( Rect.config(
TABLE_LINE_THICKNESS, s.closed_poly(TABLE_LINE_THICKNESS, CAIRO_LINE_JOIN_MITER),
Theme.BORDER_FG Theme.BORDER_FG
), ),
Line.style( Line.style(
@ -664,7 +665,10 @@ end
M.initPanel = function(x, y, w, h, thickness) M.initPanel = function(x, y, w, h, thickness)
return FillRect.build( return FillRect.build(
F.make_box(x, y, w, h), F.make_box(x, y, w, h),
Rect.style(thickness, Theme.BORDER_FG), Rect.config(
s.closed_poly(thickness, CAIRO_LINE_JOIN_MITER),
Theme.BORDER_FG
),
Theme.PANEL_BG Theme.PANEL_BG
) )
end end