From 2dd5c4f59f665df457935457e1d8573929deaab8 Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Thu, 12 Feb 2026 21:04:05 +1100 Subject: [PATCH] Slight nav bar ui change in notes mode and improved rename function responsiveness --- examples/companion_radio/main.cpp | 2 +- examples/companion_radio/ui-new/Notesscreen.h | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 688135a..20feef3 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -924,7 +924,7 @@ void handleKeyboardInput() { if (key == 'r') { if (notes->startRename()) { composeNeedsRefresh = true; - lastComposeRefresh = millis(); + lastComposeRefresh = millis() - COMPOSE_REFRESH_INTERVAL; // Trigger on next loop iteration } return; } diff --git a/examples/companion_radio/ui-new/Notesscreen.h b/examples/companion_radio/ui-new/Notesscreen.h index d979bca..d2bced7 100644 --- a/examples/companion_radio/ui-new/Notesscreen.h +++ b/examples/companion_radio/ui-new/Notesscreen.h @@ -491,14 +491,19 @@ private: display.setColor(DisplayDriver::GREEN); display.print("Notes"); - // Show rename hint when a file (not "+ New Note") is selected + // Right side of header: [R:Rename] [count] + snprintf(tmp, sizeof(tmp), "[%d]", (int)_fileList.size()); + int rightX = display.width() - display.getTextWidth(tmp) - 2; + if (_selectedFile >= 1 && _selectedFile <= (int)_fileList.size()) { + const char* hint = "[R:Rename]"; + int hintX = rightX - display.getTextWidth(hint) - 4; + display.setCursor(hintX, 0); display.setColor(DisplayDriver::YELLOW); - display.print(" R:Rename"); + display.print(hint); } - snprintf(tmp, sizeof(tmp), "[%d]", (int)_fileList.size()); - display.setCursor(display.width() - display.getTextWidth(tmp) - 2, 0); + display.setCursor(rightX, 0); display.setColor(DisplayDriver::GREEN); display.print(tmp);