mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 02:06:11 +00:00
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:
@@ -34,6 +34,9 @@ public:
|
||||
|
||||
int getCharWidth() const override { return 6 * _text_sz; }
|
||||
int getLineHeight() const override { return 8 * _text_sz; }
|
||||
// Classic Adafruit_GFX built-in font pads every measured string by one
|
||||
// trailing advance column (see DisplayDriver::textWidthTrailingGap()).
|
||||
int textWidthTrailingGap() const override { return 1; }
|
||||
|
||||
bool isOn() override { return _isOn; }
|
||||
void turnOn() override;
|
||||
|
||||
Reference in New Issue
Block a user