fix: apply rotation before splash screen, clip logo to display width

- Move applyRotation() before setCurrScreen(splash) so e-ink startup
  screen respects the saved display_rotation preference
- Clamp meshcore logo width to display.width() so it doesn't overflow
  in portrait mode (122px screen vs 128px logo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-22 23:50:21 +02:00
parent bad9fae419
commit 4dd36f685d

View File

@@ -71,7 +71,7 @@ public:
// meshcore logo
display.setColor(DisplayDriver::LIGHT);
int logoWidth = 128;
int logoWidth = min(128, display.width());
int logo_y = 3;
display.drawXbm((display.width() - logoWidth) / 2, logo_y, meshcore_logo, logoWidth, 13);
@@ -893,11 +893,10 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
nearby_screen = new NearbyScreen(this);
dashboard_config = new DashboardConfigScreen(this, node_prefs);
auto_advert_screen = new AutoAdvertScreen(this, node_prefs);
setCurrScreen(splash);
applyBrightness();
applyFont();
applyRotation();
setCurrScreen(splash);
}
void UITask::gotoSettingsScreen() {