Files
RedBear-OS/local
vasilito c4d4bdc586 tlc: phase 16 — unified MC-matching button rendering
Replace 5 dialog-specific button renderings + Dialog widget inline loop
with a single widget::button module. MC algorithm verbatim:
  Normal:   '[ X ]'        (label + 4)
  Default:  '[< X >]'       (label + 6)

Hotkey letter highlighted via [dialog] dhotfocus when focused,
dhotnormal otherwise. Variable button count, auto-sized, centered.

Files:
  src/widget/button.rs           — rewritten as free functions
                                   (render_button, render_default_button,
                                   render_button_row, button_width) + 5 tests
  src/widget/mod.rs              — re-export public API
  src/widget/dialog.rs           — Dialog::render button loop → render_button_row
  src/terminal/popup.rs          — duplicate render_button_row + push_mc_button deleted
  src/filemanager/{copy,delete,link,mkdir,move}_dialog.rs — migrated

Tests: 1109 passed (was 1108; +1 widget::button).
Binaries: tlc 5.4M, tlcedit 3.9M, tlcview 3.8M.

Docs:
  PLAN.md §16 — Phase 16 added (premium ratatui button pattern)
  IMPROVEMENT-PLAN.md — Phase 1.5 entry marked Done

Refs: cross-referenced MC source (button.c, widget.c, tty.c) for the
exact bracket/chevron algorithm + dhotfocus/dhotnormal color picks.
2026-06-20 16:04:29 +03:00
..