From 5ab3161bf57692fcf6476621ebf35df8d92e12cd Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Thu, 19 Nov 2026 18:55:02 +0100 Subject: [PATCH] app: move the review back arrow into the title bar Settings already leaves the screen from the title bar, while the review kept its own back button in the header beside the champion portrait. Both screens now share the title bar button, and the review header starts with the portrait. The button still calls leave, so the player and the soundtrack stop on the way out. --- app/src/app.rs | 9 +++++++-- app/src/screens/review.rs | 10 ---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/src/app.rs b/app/src/app.rs index 0f902fc..f06d707 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -851,13 +851,18 @@ fn titlebar(p: Paint, app: &App) -> El { // Leaving a screen is on the left, where a window's back arrow lives; the app's own // actions stay on the right. let mut leading = row().key("leading").gap(8.0).center_y(); - if app.screen == Screen::Settings { + if matches!(app.screen, Screen::Settings | Screen::Review) { leading = leading.child(ui::button( p, "back", "← Match history", false, - |app: &mut App| app.screen = Screen::History, + |app: &mut App| { + if app.screen == Screen::Review { + screens::review::leave(app); + } + app.screen = Screen::History; + }, )); } let leading = leading.child( diff --git a/app/src/screens/review.rs b/app/src/screens/review.rs index 72d414d..54d8332 100644 --- a/app/src/screens/review.rs +++ b/app/src/screens/review.rs @@ -473,16 +473,6 @@ pub fn view(app: &App, p: Paint) -> El { .key("review-title") .gap(10.0) .center_y() - .child(ui::button( - p, - "back", - "← Match history", - false, - |app: &mut App| { - leave(app); - app.screen = Screen::History; - }, - )) .child(ui::champion_portrait( app, p,