ENH use threshold style objects
This commit is contained in:
parent
03add92fdd
commit
b1d321bfc2
2
core
2
core
|
@ -1 +1 @@
|
|||
Subproject commit 927f508765e79508b7520d12d2e6467dab175a08
|
||||
Subproject commit 3d9a76cd4a4032c2e5db84e0564c69136bc27c8b
|
|
@ -150,8 +150,10 @@ M.initPercentPlot = function(x, y, w, h, spacing, label)
|
|||
nil,
|
||||
M.right_text_style,
|
||||
'%s%%',
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
80
|
||||
_G_Widget_.threshold_text_style(
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
80
|
||||
)
|
||||
),
|
||||
-- value = _G_Widget_.CriticalText{
|
||||
-- x = x + w,
|
||||
|
@ -294,8 +296,10 @@ M.initTextRing = function(x, y, r, fmt, limit)
|
|||
'center'
|
||||
),
|
||||
fmt,
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
limit
|
||||
_G_Widget_.threshold_text_style(
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
limit
|
||||
)
|
||||
),
|
||||
}
|
||||
end
|
||||
|
@ -416,9 +420,11 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit)
|
|||
'right',
|
||||
'center'
|
||||
),
|
||||
append_end,
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
limit
|
||||
append_end,
|
||||
_G_Widget_.threshold_text_style(
|
||||
_G_Patterns_.CRITICAL_FG,
|
||||
limit
|
||||
)
|
||||
)
|
||||
}
|
||||
end
|
||||
|
|
|
@ -69,12 +69,14 @@ local bars = _G_Widget_.CompoundBar(
|
|||
Patterns.INDICATOR_BG,
|
||||
CAIRO_LINE_JOIN_MITER
|
||||
),
|
||||
_G_Widget_.threshold_style(
|
||||
Patterns.INDICATOR_FG_PRIMARY,
|
||||
Patterns.INDICATOR_FG_CRITICAL,
|
||||
0.8
|
||||
),
|
||||
_SPACING_,
|
||||
FS_NUM,
|
||||
false,
|
||||
Patterns.INDICATOR_FG_PRIMARY,
|
||||
Patterns.INDICATOR_FG_CRITICAL,
|
||||
0.8
|
||||
false
|
||||
)
|
||||
|
||||
-- local labels = _G_Widget_.TextColumn{
|
||||
|
|
|
@ -65,9 +65,11 @@ local dial = _G_Widget_.Dial(
|
|||
_DIAL_THICKNESS_,
|
||||
_G_Patterns_.INDICATOR_BG
|
||||
),
|
||||
_G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
_G_Patterns_.INDICATOR_FG_CRITICAL,
|
||||
0.8
|
||||
_G_Widget_.threshold_style(
|
||||
_G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
_G_Patterns_.INDICATOR_FG_CRITICAL,
|
||||
0.8
|
||||
)
|
||||
)
|
||||
local cache_arc = _G_Widget_.Arc(
|
||||
_G_Widget_.make_semicircle(
|
||||
|
|
|
@ -76,9 +76,11 @@ local _create_core_ = function(cores, id, x, y)
|
|||
360
|
||||
),
|
||||
_G_Patterns_.INDICATOR_BG,
|
||||
_G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
_G_Patterns_.INDICATOR_FG_CRITICAL,
|
||||
0.8,
|
||||
_G_Widget_.threshold_style(
|
||||
_G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||
_G_Patterns_.INDICATOR_FG_CRITICAL,
|
||||
0.8
|
||||
),
|
||||
_DIAL_INNER_RADIUS_,
|
||||
_DIAL_SPACING_,
|
||||
NUM_THREADS_PER_CORE
|
||||
|
|
Loading…
Reference in New Issue