ENH combine max length and printf format args

This commit is contained in:
Nathan Dwarshuis 2021-07-10 22:50:30 -04:00
parent 05cf19973e
commit 7bff2e5885
4 changed files with 9 additions and 15 deletions

2
core

@ -1 +1 @@
Subproject commit 142089daafbe15d56cdc55d66263644656a0aeec Subproject commit 689de54a962b7e1960859e214103ee50c67ee153

View File

@ -147,10 +147,7 @@ M.initPercentPlot = function(x, y, w, h, spacing, label)
_G_Widget_.make_point(x + w, y), _G_Widget_.make_point(x + w, y),
nil, nil,
M.right_text_style, M.right_text_style,
_G_Widget_.text_format( '%s%%',
'%s%%',
false
),
_G_Patterns_.CRITICAL_FG, _G_Patterns_.CRITICAL_FG,
80 80
), ),
@ -294,7 +291,7 @@ M.initTextRing = function(x, y, r, fmt, limit)
'center', 'center',
'center' 'center'
), ),
_G_Widget_.text_format(fmt, false), fmt,
_G_Patterns_.CRITICAL_FG, _G_Patterns_.CRITICAL_FG,
limit limit
), ),
@ -415,10 +412,7 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit)
'right', 'right',
'center' 'center'
), ),
_G_Widget_.text_format( append_end,
append_end,
false
),
_G_Patterns_.CRITICAL_FG, _G_Patterns_.CRITICAL_FG,
limit limit
) )
@ -452,7 +446,7 @@ M.initTextRows = function(x, y, w, spacing, labels)
_G_Widget_.make_point(x, y), _G_Widget_.make_point(x, y),
labels, labels,
M.left_text_style, M.left_text_style,
_G_Widget_.text_format(false, false), nil,
spacing spacing
), ),
-- values = _G_Widget_.TextColumn{ -- values = _G_Widget_.TextColumn{
@ -469,7 +463,7 @@ M.initTextRows = function(x, y, w, spacing, labels)
_G_Widget_.make_point(x + w, y), _G_Widget_.make_point(x + w, y),
#labels, #labels,
M.right_text_style, M.right_text_style,
_G_Widget_.text_format(false, false), nil,
spacing spacing
) )
} }

View File

@ -99,7 +99,7 @@ local labels = _G_Widget_.TextColumn(
'left', 'left',
'center' 'center'
), ),
_G_Widget_.text_format(false, false), nil,
_SPACING_ _SPACING_
) )

View File

@ -143,7 +143,7 @@ local cache = {
'left', 'left',
'center' 'center'
), ),
_G_Widget_.text_format(false, false), nil,
_TEXT_SPACING_ _TEXT_SPACING_
), ),
percents = _G_Widget_.initTextColumnN( percents = _G_Widget_.initTextColumnN(
@ -158,7 +158,7 @@ local cache = {
'right', 'right',
'center' 'center'
), ),
_G_Widget_.text_format('%s%%', false), '%s%%',
_TEXT_SPACING_ _TEXT_SPACING_
), ),
} }