History

stats.lua: align 100% correctly on page 2

It is not common to have one pass with 100% usage, but it is not impossible, so handle this case too.

Kacper Michajłow committed 2 years ago

Commit a41cdf01 parent 6031a0e1 file · +2 −2Browse files

Showing the changes to player/lua/stats.lua (1 of 1 file). Show all

Unified · Split

player/lua/stats.lua+2−2
@@ -348,7 +348,7 @@ local function append_perfdata(header, s, dedicated_page) · 347 unmodified lines
348348 end
349349 -- Calculate font weight. 100 is minimum, 400 is normal, 700 bold, 900 is max
350350 local w = (700 * math.sqrt(i)) + 200
351− return format("{\\b%d}%2d%%{\\b0}", w, i * 100)
351+ return format("{\\b%d}%3d%%{\\b0}", w, i * 100)
352352 end
353353
354354 -- ensure that the fixed title is one element and every scrollable line is
@@ -372,7 +372,7 @@ local function append_perfdata(header, s, dedicated_page) · 17 unmodified lines
372372 s[#s+1] = format(f, o.nl, o.indent, o.indent,
373373 o.font_mono, pp(pass["last"]),
374374 pp(pass["avg"]), pp(pass["peak"]),
375− o.prefix_sep .. "\\h\\h", p(pass["last"], last_s[frame]),
375+ o.prefix_sep .. "\\h", p(pass["last"], last_s[frame]),
376376 o.font, o.prefix_sep, o.prefix_sep, pass["desc"])
377377
378378 if o.plot_perfdata and o.use_ass then

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t