fix(ui): revert corner-anchored context menus, centre unread badge, add room logout

- Context menus (PopupMenu, Nearby/QuickMsg call sites) go back to centring on
  screen; the header's discoverable-menu glyph stays, but dropping the popup
  out of its corner looked bad on some screens.
- Unread pill badge digit wasn't centred: Adafruit_GFX's classic built-in font
  (SH1106/SSD1306) always pads a measured string by one trailing advance
  column regardless of the glyph drawn, so centring on the raw width left 1px
  more slack on the right than the left. New DisplayDriver::
  textWidthTrailingGap() (0 by default) corrects for it on those two backends.
- On-device room Logout: mirrors the app's CMD_LOGOUT (drops keep-alive
  tracking, forgets the saved password) so a room can be deliberately signed
  out of from the Room options menu, not just re-logged-in.

Not build-verified — no PlatformIO toolchain available this session.
This commit is contained in:
Jakub
2026-07-10 16:01:14 +02:00
parent a1ee67ae94
commit cf3c2c0353
7 changed files with 90 additions and 31 deletions
@@ -415,7 +415,7 @@ class NearbyScreen : public UIScreen {
void startDeleteConfirm() {
const Entry* e = selected();
if (!e || !e->has_key || !entryIsContact(e)) return;
_confirm.begin("Delete contact?", 2, true);
_confirm.begin("Delete contact?", 2);
_confirm.addItem("Delete");
_confirm.addItem("Cancel");
_confirm.setSelected(1);
@@ -451,7 +451,7 @@ class NearbyScreen : public UIScreen {
void rebuildPingMenu() {
int keep = _ping_menu.selectedIndex(); // preserve selection across a rebuild
_ping_menu.begin("Ping", 4, true);
_ping_menu.begin("Ping", 4);
_ping_menu.addItem("Send");
if (_ping_time_str[0]) _ping_menu.addItem(_ping_time_str);
if (_ping_snr_out_str[0]) _ping_menu.addItem(_ping_snr_out_str);
@@ -543,7 +543,7 @@ class NearbyScreen : public UIScreen {
buildSortLabel();
_menu_action_count = 0;
_menu.begin("Options", 10, true);
_menu.begin("Options", 10);
auto add = [&](const char* label, Action a) {
_menu.addItem(label);
_menu_actions[_menu_action_count++] = a;