From e6848b65ed673f3e948522ced64ffb68c1f20970 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Tue, 12 May 2026 13:53:52 +0200 Subject: [PATCH] ToolsScreen: match list style of other screens; bot DM: favourites only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ToolsScreen now follows the same rendering convention as QuickMsgScreen and SettingsScreen: START_Y=12, '>' prefix on selected item, explicit setColor per item (light fill → dark text for selection). Bot DM contact picker now filters to favourites-only (flags & 0x01), consistent with the DM contact list behaviour elsewhere in the UI. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 65751a32..8bc86c23 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -2134,6 +2134,7 @@ class BotScreen : public UIScreen { for (int i = 0; i < n && _num_dm < MAX_BOT_DM; i++) { if (!the_mesh.getContactByIdx(i, ci)) continue; if (ci.type != ADV_TYPE_CHAT) continue; + if (!(ci.flags & 0x01)) continue; // favourites only memcpy(_dm_pubkeys[_num_dm], ci.id.pub_key, 4); strncpy(_dm_names[_num_dm], ci.name, sizeof(_dm_names[0]) - 1); _dm_names[_num_dm][sizeof(_dm_names[0]) - 1] = '\0'; @@ -2401,16 +2402,21 @@ public: display.fillRect(0, 10, display.width(), 1); for (int i = 0; i < ITEM_COUNT; i++) { - int y = 14 + i * 12; + int y = 12 + i * 12; bool sel = (i == _sel); if (sel) { + display.setColor(DisplayDriver::LIGHT); display.fillRect(0, y - 1, display.width(), 11); display.setColor(DisplayDriver::DARK); + } else { + display.setColor(DisplayDriver::LIGHT); } - display.setCursor(4, y); + display.setCursor(0, y); + display.print(sel ? ">" : " "); + display.setCursor(8, y); display.print(ITEMS[i]); - display.setColor(DisplayDriver::LIGHT); } + display.setColor(DisplayDriver::LIGHT); display.setCursor(0, 54); display.print("ENT:open CANCEL:back");