https://gitlab.synchro.net/main/sbbs/-/commit/0986ce16e012c80d9deec348
Modified Files:
exec/xtrn_sec.js
Log Message:
xtrn_sec.js: center the section list on its content too
Follow-up to centering the program list. The section list used
(screen_columns - longest)/2 - 5, where longest was the longest section NAME and 5 was a guessed allowance for the "%3d: " numbering. That misjudges the real row width both ways: with the default format the list sits a few columns left of center at every width, and a customized section_fmt (wider numbering,
a suffix) throws it off in the other direction.
Measure the widest rendered row with strip_ctrl(), exactly as the program list now does, and split the slack -- dead center regardless of screen width or how section_fmt is themed. The separate longest-name precomputation at the top of external_section_menu() is now unused and removed.
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)