ENH update core

This commit is contained in:
Nathan Dwarshuis 2021-08-08 18:06:28 -04:00
parent e55ef84108
commit da32ac31f3
4 changed files with 39 additions and 32 deletions

2
core

@ -1 +1 @@
Subproject commit e83c1cac1000d1fac2f84e52128a859d26798fff Subproject commit 0390516cf112b4e239de4efd8f7a5e0d238acf8d

View File

@ -593,7 +593,8 @@ end
local default_table_font_spec = make_font_spec(FONT, TABLE_FONT_SIZE, false) local default_table_font_spec = make_font_spec(FONT, TABLE_FONT_SIZE, false)
local default_table_style = tbl.config( local default_table_config = function(label)
return tbl.config(
rect.config( rect.config(
style.closed_poly(TABLE_LINE_THICKNESS, CAIRO_LINE_JOIN_MITER), style.closed_poly(TABLE_LINE_THICKNESS, CAIRO_LINE_JOIN_MITER),
theme.BORDER_FG theme.BORDER_FG
@ -611,22 +612,28 @@ local default_table_style = tbl.config(
tbl.body_config( tbl.body_config(
default_table_font_spec, default_table_font_spec,
theme.INACTIVE_TEXT_FG, theme.INACTIVE_TEXT_FG,
TABLE_BODY_FORMAT -- TABLE_BODY_FORMAT,
{
tbl.column_config('Name', TABLE_BODY_FORMAT),
tbl.column_config('PID', false),
tbl.column_config(label, false),
}
), ),
F.padding( tbl.padding(
TABLE_HORZ_PAD, TABLE_HORZ_PAD,
TABLE_VERT_PAD, TABLE_VERT_PAD,
TABLE_HORZ_PAD, TABLE_HORZ_PAD,
TABLE_VERT_PAD TABLE_VERT_PAD
) )
) )
end
M.make_text_table = function(x, y, w, h, n, labels) M.make_text_table = function(x, y, w, h, n, label)
return tbl.make( return tbl.make(
F.make_box(x, y, w, h), F.make_box(x, y, w, h),
n, n,
labels, -- labels,
default_table_style default_table_config(label)
) )
end end

View File

@ -127,7 +127,7 @@ return function(update_freq)
geometry.SECTION_WIDTH, geometry.SECTION_WIDTH,
TABLE_HEIGHT, TABLE_HEIGHT,
NUM_ROWS, NUM_ROWS,
{'Name', 'PID', 'Mem (%)'} 'Mem (%)'
) )
----------------------------------------------------------------------------- -----------------------------------------------------------------------------

View File

@ -128,7 +128,7 @@ return function(update_freq)
geometry.SECTION_WIDTH, geometry.SECTION_WIDTH,
TABLE_HEIGHT, TABLE_HEIGHT,
NUM_ROWS, NUM_ROWS,
{'Name', 'PID', 'cpu (%)'} 'CPU (%)'
) )
----------------------------------------------------------------------------- -----------------------------------------------------------------------------