From ab7a6bc71c6efcf009ada30f1633d8729c337b76 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 25 May 2026 09:06:14 -0700 Subject: [PATCH] ux: drop redundant 'Reset Sel' button; full-width 'Clear Selection' Reset Sel advertised an 'R' key that was never bound and only set the selection to the current view, overlapping Clear/Esc. Removed it and made Clear a single full-width button labelled to match the Esc shortcut. Co-Authored-By: Claude Opus 4.7 --- src/ui.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/ui.c b/src/ui.c index 3990038..d676246 100644 --- a/src/ui.c +++ b/src/ui.c @@ -465,18 +465,8 @@ void DrawSidebar(void) DrawTextScaled(isFullscreen ? "Exit Fullscreen (F11)" : "Fullscreen (F11)", fsButton.x + 10 * scale, fsButton.y + 6 * scale, 14, WHITE); y += 38 * scale; - // Reset/Clear buttons - Rectangle resetButton = { x, y, (sidebarWidth - 15 * scale) / 2, 25 * scale }; - if (Clicked(resetButton)) { - app.timeSelectionStart = app.viewStart; - app.timeSelectionEnd = app.viewEnd; - app.freqSelectionStart = 0.0f; - app.freqSelectionEnd = 1.0f; - } - DrawPanelBox(resetButton, (Color){ 80, 50, 50, 255 }, RED); - DrawTextScaled("Reset Sel (R)", resetButton.x + 10 * scale, resetButton.y + 6 * scale, 14, WHITE); - - Rectangle clearButton = { x + resetButton.width + 5 * scale, y, (sidebarWidth - 15 * scale) / 2, 25 * scale }; + // Clear selection (identical to the Esc key) + Rectangle clearButton = { x, y, sidebarWidth - 10 * scale, 25 * scale }; if (Clicked(clearButton)) { app.timeSelectionStart = 0.0f; app.timeSelectionEnd = 1.0f; @@ -484,7 +474,7 @@ void DrawSidebar(void) app.freqSelectionEnd = 1.0f; } DrawPanelBox(clearButton, (Color){ 80, 50, 50, 255 }, RED); - DrawTextScaled("Clear (ESC)", clearButton.x + 10 * scale, clearButton.y + 6 * scale, 14, WHITE); + DrawTextScaled("Clear Selection (ESC)", clearButton.x + 10 * scale, clearButton.y + 6 * scale, 14, WHITE); y += 38 * scale; // Export PNG