terminal emulator
git clone https://git.lucas.co/cce-terminal.git
refactor(plate_menu): the tab rows' radio marks are the shared menu's MARK_ON / MARK_OFF
They already spelled "● " / "○ " exactly, which paint_with_labels draws
as the circle / circle-outline glyphs; naming the constants keeps them on
that convention rather than on two characters that happen to match it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/plate_menu.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/plate_menu.rs b/src/plate_menu.rs
index 0215d4e..8282193 100644
--- a/src/plate_menu.rs
+++ b/src/plate_menu.rs
@@ -123,10 +123,12 @@ impl TerminalApp {
row("-", PlateMenuAction::Separator);
// The tabs as a RADIO group: every one listed, the shown one marked.
// Clicking the marked row is a no-op (show_tab declines the active
- // index), so the list reads as state, not just as actions.
+ // index), so the list reads as state, not just as actions. The marks
+ // are the shared menu's convention, drawn as the `circle` /
+ // `circle-outline` glyphs by `paint_with_labels`.
for (i, tab) in self.tabs.iter().enumerate() {
- let mark = if i == self.active { "●" } else { "○" };
- row(&format!("{mark} {}", tab.label(i)), PlateMenuAction::ShowTab(tab.id));
+ let mark = if i == self.active { context_menu::MARK_ON } else { context_menu::MARK_OFF };
+ row(&format!("{mark}{}", tab.label(i)), PlateMenuAction::ShowTab(tab.id));
}
row("New Tab", PlateMenuAction::NewTab);
if self.tabs.len() > 1 {