REF move pattern code into drawing modules
This commit is contained in:
parent
ed505d0e15
commit
d4ac91ac35
2
core
2
core
|
@ -1 +1 @@
|
|||
Subproject commit 7b8e82ee6a5c3c18133c1edc0f7247b3d20b4cb3
|
||||
Subproject commit a5f1912f6bf2a1fa54d9385971400fcb2de80e90
|
|
@ -55,7 +55,8 @@ local separator = _G_Widget_.Line{
|
|||
p2 = {
|
||||
x = _G_INIT_DATA_.RIGHT_X + _G_INIT_DATA_.SECTION_WIDTH,
|
||||
y = _SEP_Y_,
|
||||
}
|
||||
},
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
}
|
||||
|
||||
local _BAR_Y_ = _SEP_Y_ + _SEPARATOR_SPACING_
|
||||
|
@ -67,7 +68,9 @@ local bars = _G_Widget_.CompoundBar{
|
|||
spacing = _SPACING_,
|
||||
num_bars = FS_NUM,
|
||||
-- thickness = 12,
|
||||
critical_limit = '>0.8'
|
||||
critical_limit = '>0.8',
|
||||
indicator_pattern = Patterns.INDICATOR_FG_PRIMARY,
|
||||
line_pattern = Patterns.INDICATOR_BG,
|
||||
}
|
||||
|
||||
local labels = _G_Widget_.TextColumn{
|
||||
|
|
|
@ -44,7 +44,8 @@ local _SEP_Y_1_ = header.bottom_y + _SEPARATOR_SPACING_
|
|||
|
||||
local separator1 = _G_Widget_.Line{
|
||||
p1 = {x = _G_INIT_DATA_.LEFT_X, y = _SEP_Y_1_},
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_1_}
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_1_},
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
}
|
||||
|
||||
local _INTERNAL_TEMP_Y_ = _SEP_Y_1_ + _SEPARATOR_SPACING_
|
||||
|
@ -68,7 +69,8 @@ local _SEP_Y_2_ = _INTERNAL_TEMP_Y_ + _SEPARATOR_SPACING_
|
|||
|
||||
local separator2 = _G_Widget_.Line{
|
||||
p1 = {x = _G_INIT_DATA_.LEFT_X, y = _SEP_Y_2_},
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_2_}
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_2_},
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
}
|
||||
|
||||
local _CLOCK_SPEED_Y_ = _SEP_Y_2_ + _SEPARATOR_SPACING_
|
||||
|
@ -95,7 +97,8 @@ local _SEP_Y_3_ = _CLOCK_SPEED_Y_ + _TEXT_SPACING_ * 2
|
|||
|
||||
local separator3 = _G_Widget_.Line{
|
||||
p1 = {x = _G_INIT_DATA_.LEFT_X, y = _SEP_Y_3_},
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_3_}
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_3_},
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
}
|
||||
|
||||
local _GPU_UTIL_Y_ = _SEP_Y_3_ + _SEPARATOR_SPACING_
|
||||
|
@ -117,7 +120,11 @@ local gpu_util = {
|
|||
x = _G_INIT_DATA_.LEFT_X,
|
||||
y = _GPU_UTIL_Y_ + _PLOT_SEC_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_
|
||||
height = _PLOT_HEIGHT_,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +147,11 @@ local mem_util = {
|
|||
x = _G_INIT_DATA_.LEFT_X,
|
||||
y = _MEM_UTIL_Y_ + _PLOT_SEC_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_
|
||||
height = _PLOT_HEIGHT_,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +174,11 @@ local vid_util = {
|
|||
x = _G_INIT_DATA_.LEFT_X,
|
||||
y = _VID_UTIL_Y_ + _PLOT_SEC_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_
|
||||
height = _PLOT_HEIGHT_,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,9 @@ local dial = _G_Widget_.Dial{
|
|||
y = DIAL_Y,
|
||||
radius = DIAL_RADIUS,
|
||||
thickness = _DIAL_THICKNESS_,
|
||||
critical_limit = '>0.8'
|
||||
critical_limit = '>0.8',
|
||||
dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
arc_pattern = _G_Patterns_.INDICATOR_BG
|
||||
}
|
||||
local cache_arc = _G_Widget_.Arc{
|
||||
x = DIAL_X,
|
||||
|
@ -136,7 +138,11 @@ local plot = _G_Widget_.LabelPlot{
|
|||
x = _G_INIT_DATA_.RIGHT_X,
|
||||
y = _PLOT_Y_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_
|
||||
height = _PLOT_HEIGHT_,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
|
||||
local tbl = _G_Widget_.Table{
|
||||
|
@ -144,6 +150,10 @@ local tbl = _G_Widget_.Table{
|
|||
y = _PLOT_Y_ + _PLOT_HEIGHT_ + _TABLE_SECTION_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _TABLE_HEIGHT_,
|
||||
body_color = _G_Patterns_.INACTIVE_TEXT_FG,
|
||||
header_color = _G_Patterns_.PRIMARY_FG,
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
separator_pattern = _G_Patterns_.BORDER_FG,
|
||||
'Name',
|
||||
'PID',
|
||||
'Mem (%)'
|
||||
|
|
|
@ -42,7 +42,11 @@ local dnload = {
|
|||
y = header.bottom_y + _PLOT_SEC_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = network_label_function
|
||||
y_label_func = network_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +69,11 @@ local upload = {
|
|||
y = _UPLOAD_Y_ + _PLOT_SEC_BREAK_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = network_label_function
|
||||
y_label_func = network_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,10 @@ local pkg0 = {
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = power_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -76,6 +80,10 @@ local dram = {
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = power_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,6 +107,10 @@ local battery_draw = {
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = power_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,9 @@ local _create_core_ = function(cores, id, x, y)
|
|||
outer_radius = _DIAL_OUTER_RADIUS_,
|
||||
spacing = _DIAL_SPACING_,
|
||||
num_dials = NUM_THREADS_PER_CORE,
|
||||
critical_limit = '>0.8'
|
||||
critical_limit = '>0.8',
|
||||
dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
arc_pattern = _G_Patterns_.INDICATOR_BG
|
||||
},
|
||||
inner_ring = _G_Widget_.Arc{
|
||||
x = x,
|
||||
|
@ -149,7 +151,8 @@ local _SEP_Y_ = _FREQ_Y_ + _SEPARATOR_SPACING_
|
|||
|
||||
local separator = _G_Widget_.Line{
|
||||
p1 = {x = _G_INIT_DATA_.LEFT_X, y = _SEP_Y_},
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_}
|
||||
p2 = {x = _RIGHT_X_, y = _SEP_Y_},
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
}
|
||||
|
||||
local _LOAD_Y_ = _SEP_Y_ + _SEPARATOR_SPACING_
|
||||
|
@ -175,7 +178,11 @@ local plot = _G_Widget_.LabelPlot{
|
|||
x = _G_INIT_DATA_.LEFT_X,
|
||||
y = _PLOT_Y_,
|
||||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_
|
||||
height = _PLOT_HEIGHT_,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
|
||||
local tbl = _G_Widget_.Table{
|
||||
|
@ -184,6 +191,10 @@ local tbl = _G_Widget_.Table{
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _TABLE_HEIGHT_,
|
||||
num_rows = NUM_ROWS,
|
||||
body_color = _G_Patterns_.INACTIVE_TEXT_FG,
|
||||
header_color = _G_Patterns_.ACTIVE_FG,
|
||||
line_pattern = _G_Patterns_.BORDER_FG,
|
||||
separator_pattern = _G_Patterns_.BORDER_FG,
|
||||
'Name',
|
||||
'PID',
|
||||
'CPU (%)'
|
||||
|
|
|
@ -76,6 +76,10 @@ local reads = {
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = io_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,6 +104,10 @@ local writes = {
|
|||
width = _G_INIT_DATA_.SECTION_WIDTH,
|
||||
height = _PLOT_HEIGHT_,
|
||||
y_label_func = io_label_function,
|
||||
outline_pattern = _G_Patterns_.BORDER_FG,
|
||||
intrvl_pattern = _G_Patterns_.BORDER_FG,
|
||||
data_line_pattern = _G_Patterns_.PLOT_FILL_BORDER_PRIMARY,
|
||||
data_fill_pattern = _G_Patterns_.PLOT_FILL_BG_PRIMARY,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue