Files
SimpleRemoter/server/2015Remote
yuanyuanxianganddeepseek-flash 798456032e Fix(server): size status bar panes from measured text
The FRP/runtime/expiry panes kept fixed 250/180/180 pixel widths while the
text is drawn with a system font that changes with language, display
scaling and accessibility text size. Where the font is larger the expiry
text is cut inside the pane: "到期: 2026-12-31 (41天)" shows the date but
drops the remaining days, and the wider English "Expires: 2026-12-31 (41d)"
stays cut on another machine.

Measure each pane's text as wide characters (the status bar control is
Unicode internally; ANSI measurement is up to 10% narrower for CJK) against
several candidate fonts - the pane's own font, SYSTEM_FONT, DEFAULT_GUI_FONT,
lfStatusFont and lfMessageFont - and take the widest. Widths never drop below
the previously proven 250/180/180, so 100% scaling layouts are unchanged, and
the expiry pane gets an extra 20px with a 220px floor for the longer English
string.

A new LayoutStatusPanes() applies the widths in one place and, when their sum
exceeds the bar, hides panes in priority order (runtime -> FRP -> MCP -> TLS)
so the last pane cannot be clipped at the window edge. OnSize, the periodic
refresh and the FRP auto-proxy start/stop all go through it now.

Verified with Release x64 builds; visual confirmation on the affected
machines is still pending.

Co-Authored-By: deepseek-flash
2026-11-21 12:31:38 +01:00
..
2026-11-14 14:30:34 +01:00
2026-11-14 14:30:34 +01:00