Allow disabling USB connection by discarding the pop-up menu

This commit is contained in:
Raphael Coeffic
2021-05-24 16:23:06 +02:00
committed by Raphael Coeffic
parent 4fe4c1a385
commit 0bb9994ac5
3 changed files with 68 additions and 18 deletions
@@ -90,11 +90,16 @@ void TopbarImpl::paint(BitmapBuffer * dc)
// USB icon
if (usbPlugged()) {
dc->drawBitmapPattern(LCD_W - 98, 8, LBM_TOPMENU_USB, MENU_COLOR);
}
LcdFlags flags = MENU_COLOR;
if (getSelectedUsbMode() == USB_UNSELECTED_MODE) {
flags = MENU_TITLE_DISABLE_COLOR;
}
dc->drawBitmapPattern(LCD_W - 98, 8, LBM_TOPMENU_USB, flags);
}
// Logs
if (isFunctionActive(FUNCTION_LOGS) && !usbPlugged() && BLINK_ON_PHASE) {
else if (isFunctionActive(FUNCTION_LOGS) && BLINK_ON_PHASE) {
dc->drawBitmapPattern(LCD_W - 98, 6, LBM_DOT, MENU_COLOR);
}