From 7bff2e5885fdfcdfd4947828e766a11fbe7f945b Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 10 Jul 2021 22:50:30 -0400 Subject: [PATCH] ENH combine max length and printf format args --- core | 2 +- drawing/Common.lua | 16 +++++----------- drawing/FileSystem.lua | 2 +- drawing/Memory.lua | 4 ++-- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/core b/core index 142089d..689de54 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 142089daafbe15d56cdc55d66263644656a0aeec +Subproject commit 689de54a962b7e1960859e214103ee50c67ee153 diff --git a/drawing/Common.lua b/drawing/Common.lua index f369ff8..cfcff35 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -147,10 +147,7 @@ M.initPercentPlot = function(x, y, w, h, spacing, label) _G_Widget_.make_point(x + w, y), nil, M.right_text_style, - _G_Widget_.text_format( - '%s%%', - false - ), + '%s%%', _G_Patterns_.CRITICAL_FG, 80 ), @@ -294,7 +291,7 @@ M.initTextRing = function(x, y, r, fmt, limit) 'center', 'center' ), - _G_Widget_.text_format(fmt, false), + fmt, _G_Patterns_.CRITICAL_FG, limit ), @@ -415,10 +412,7 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit) 'right', 'center' ), - _G_Widget_.text_format( - append_end, - false - ), + append_end, _G_Patterns_.CRITICAL_FG, limit ) @@ -452,7 +446,7 @@ M.initTextRows = function(x, y, w, spacing, labels) _G_Widget_.make_point(x, y), labels, M.left_text_style, - _G_Widget_.text_format(false, false), + nil, spacing ), -- values = _G_Widget_.TextColumn{ @@ -469,7 +463,7 @@ M.initTextRows = function(x, y, w, spacing, labels) _G_Widget_.make_point(x + w, y), #labels, M.right_text_style, - _G_Widget_.text_format(false, false), + nil, spacing ) } diff --git a/drawing/FileSystem.lua b/drawing/FileSystem.lua index 20efaa1..f2f9f5a 100644 --- a/drawing/FileSystem.lua +++ b/drawing/FileSystem.lua @@ -99,7 +99,7 @@ local labels = _G_Widget_.TextColumn( 'left', 'center' ), - _G_Widget_.text_format(false, false), + nil, _SPACING_ ) diff --git a/drawing/Memory.lua b/drawing/Memory.lua index 280edcb..72dcdcf 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -143,7 +143,7 @@ local cache = { 'left', 'center' ), - _G_Widget_.text_format(false, false), + nil, _TEXT_SPACING_ ), percents = _G_Widget_.initTextColumnN( @@ -158,7 +158,7 @@ local cache = { 'right', 'center' ), - _G_Widget_.text_format('%s%%', false), + '%s%%', _TEXT_SPACING_ ), }