From 928e187524a31f502af2b326be2a9a34b0938b71 Mon Sep 17 00:00:00 2001 From: Irastris Date: Thu, 7 May 2026 15:57:52 -0400 Subject: [PATCH] Add mobile layout for prelaunch --- res/rml/prelaunch.rcss | 81 +++++++++++++++++++++++++++++++++++++++ src/dusk/ui/prelaunch.cpp | 2 +- 2 files changed, 82 insertions(+), 1 deletion(-) diff --git a/res/rml/prelaunch.rcss b/res/rml/prelaunch.rcss index 4bf74f54d4..16bc7ea4ed 100644 --- a/res/rml/prelaunch.rcss +++ b/res/rml/prelaunch.rcss @@ -322,3 +322,84 @@ body.animate-in .intro-item { .delay-5 { transition: opacity transform 0.3s 0.6s cubic-in-out; } + +/* Mobile layout */ +@media (max-height: 640dp) { + .gradient { + decorator: horizontal-gradient(#00000000 #000000FF); + } + + body.mirrored .gradient { + decorator: horizontal-gradient(#000000FF #00000000); + } + + menu { + left: 20dp; + right: 20dp; + width: auto; + min-width: 0; + max-width: none; + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: 16dp; + } + + body.mirrored menu { + left: 20dp; + right: 20dp; + flex-direction: row-reverse; + } + + hero { + flex: 1 1 0; + min-width: 0; + max-width: 48%; + + } + + body.mirrored hero { + align-items: flex-end; + } + + hero img { + width: 100%; + } + + #menu-list { + flex: 1 1 0; + min-width: 0; + max-width: 52%; + align-items: flex-end; + } + + #menu-list button { + width: 100%; + max-width: 100%; + text-align: right; + } + + #menu-list button:hover, + #menu-list button:focus-visible { + decorator: horizontal-gradient(#FEE68500 #FEE685FF); + } + + body.mirrored #menu-list { + align-items: flex-start; + } + + body.mirrored #menu-list button { + text-align: left; + } + + body.mirrored #menu-list button:hover, + body.mirrored #menu-list button:focus-visible { + decorator: horizontal-gradient(#FEE685FF #FEE68500); + } + + .eyebrow, + disc-info, + version-info { + display: none; + } +} diff --git a/src/dusk/ui/prelaunch.cpp b/src/dusk/ui/prelaunch.cpp index 92bdbe82b5..f4df079f6f 100644 --- a/src/dusk/ui/prelaunch.cpp +++ b/src/dusk/ui/prelaunch.cpp @@ -621,7 +621,7 @@ Prelaunch::Prelaunch() : Document(kDocumentSource), mRoot(mDocument->GetElementB }); apply_intro_animation(mMenuButtons.back()->root(), "delay-2"); - mMenuButtons.push_back(std::make_unique