From 05cf19973ec81d53cb979d8a672802333ba265ad Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 10 Jul 2021 19:44:32 -0400 Subject: [PATCH] ENH use separate fun for threshold text --- core | 2 +- drawing/Common.lua | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/core b/core index fe7f073..142089d 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit fe7f073acd35fea54ecba747dd6d0bff708143a0 +Subproject commit 142089daafbe15d56cdc55d66263644656a0aeec diff --git a/drawing/Common.lua b/drawing/Common.lua index 758c00f..f369ff8 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -143,15 +143,10 @@ M.initPercentPlot = function(x, y, w, h, spacing, label) -- font_spec = M.normal_font_spec, -- }, label = _left_text(_G_Widget_.make_point(x, y), label), - value = _G_Widget_.CriticalText( + value = _G_Widget_.formattedThresholdText( _G_Widget_.make_point(x + w, y), nil, - _G_Widget_.text_style( - M.normal_font_spec, - _G_Patterns_.PRIMARY_FG, - 'right', - 'center' - ), + M.right_text_style, _G_Widget_.text_format( '%s%%', false @@ -290,7 +285,7 @@ M.initTextRing = function(x, y, r, fmt, limit) -- critical_color = _G_Patterns_.CRITICAL_FG, -- font_spec = M.normal_font_spec, -- }, - value = _G_Widget_.CriticalText( + value = _G_Widget_.formattedThresholdText( _G_Widget_.make_point(x, y), nil, _G_Widget_.text_style( @@ -411,7 +406,7 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit) -- text = '', -- font_spec = M.normal_font_spec, -- } - value = _G_Widget_.CriticalText( + value = _G_Widget_.formattedThresholdText( _G_Widget_.make_point(x + w, y), nil, _G_Widget_.text_style(