From b931a069984c0d5f847db162c72a5a3ecd32d270 Mon Sep 17 00:00:00 2001 From: Jaap-Jan de Wit | DodoTech Date: Sat, 8 Aug 2026 15:22:04 +0200 Subject: [PATCH] Repaint the phone's chrome, radii and accent to the v5 vocabulary --- src/DodoSSH.Client.Android/Theme/Phone.axaml | 96 +++++++++++++++---- .../Views/FilesScreen.axaml | 7 +- .../Views/HostActionBar.axaml | 4 +- .../Views/HostsScreen.axaml | 7 +- .../Views/LockedScreen.axaml | 4 +- .../Views/PhoneRail.axaml | 16 +++- .../Views/PhoneShell.axaml | 22 ++++- .../Views/RecoveryCodeScreen.axaml | 10 +- .../Views/ServerScreen.axaml | 14 ++- .../Views/SnippetsScreen.axaml | 14 ++- .../Views/TerminalScreen.axaml | 15 +-- .../Views/VaultsScreen.axaml | 4 +- 12 files changed, 168 insertions(+), 45 deletions(-) diff --git a/src/DodoSSH.Client.Android/Theme/Phone.axaml b/src/DodoSSH.Client.Android/Theme/Phone.axaml index 6c51b9c..5ee8c3c 100644 --- a/src/DodoSSH.Client.Android/Theme/Phone.axaml +++ b/src/DodoSSH.Client.Android/Theme/Phone.axaml @@ -12,10 +12,28 @@ the alternative, and the red one is the one that costs something. ── v2 ────────────────────────────────────────────────────────────────────────────────────────────── - The second design rounds everything. The corner radii below are the design's own — 4 for a tag, 9 for a - button or a pill, 10 for a list row, 11 for the search well, 12 for a card, 14 for a block of - monospaced output — and they are a ladder rather than a set of preferences: the radius says how big the - thing is, so a 12 on a chip or a 4 on a card reads as the wrong size before it reads as the wrong shape. + The second design rounded everything on its own ladder — 4 for a tag, 9 for a button or a pill, 10 for + a list row, 11 for the search well, 12 for a card, 14 for a block of monospaced output — and the numbers + below carried it for three passes: the radius said how big the thing was, so a 12 on a chip or a 4 on a + card read as the wrong size before it read as the wrong shape. Left as a record of that reasoning rather + than deleted, because the reasoning still holds; only the numbers it was reasoning about have moved. + + ── v5 ────────────────────────────────────────────────────────────────────────────────────────────── + This pass takes the desktop's v5 ladder instead of v2's own, on the same reversal recorded for the + fonts: the phone now matches the desktop's shape as well as its face. Three rungs rather than six — + cards and sections stay 12, a button or a field is 10, a chip or a tag is 6 — collapsing v2's 9/10/11 + into the one value the desktop's buttons and fields already use, and moving its 4 up to 6 and its 14 + down to 12 to land on the desktop's own chip and card numbers. The ladder still says how big a thing + is before it says what shape it is; it is just a shorter ladder now, because the desktop it is copying + never drew v2's 11-radius search well or a card any rounder than a chip's neighbour a step away, and the + same case that closed the gap between 9, 10 and 11 closes the one between 12 and 14. + + Not every radius on this head belongs to this ladder. The floating action button is 28 — half its own + 56, which is a circle rather than a ladder rung — and the sheets stay at 22 on their top corners only, + which is a phone idiom this codebase's own bottom sheets have used since v2 and the desktop draws + nothing like. Both are documented where they are set rather than here, for the reason FAB and sheet + radii are always documented locally: a reader who only ever meets one of them should not have to find + this paragraph to learn it was deliberate. --> + + + @@ -39,9 +74,15 @@ Disabled is drawn as flat and unlit rather than merely dimmed. The design's CONTINUE button on the recovery screen is disabled until the checkbox is ticked, and a user who cannot tell it is disabled reads the screen as broken rather than as waiting for them. + + BoxShadow has to be cleared here too, as "none" rather than left unset — see the remark on + Button.accent:disabled in the desktop's App.axaml for why the literal string is required and an empty + BoxShadows is not: the base rule's glow Setter is still in effect wherever a more specific one does not + override it, and a disabled primary button lit with a glow would read as wanting to be pressed. --> @@ -54,7 +95,7 @@ - + @@ -69,7 +110,7 @@ - + @@ -126,7 +167,17 @@ Accent-filled, which it shares with Button.primary and with nothing else — and it means the same thing in both places: the one action on the surface that is not a choice between peers. Circular by radius - rather than by a Path, so the pressed state the template draws is the same shape as the button. + rather than by a Path, so the pressed state the template draws is the same shape as the button — 28, + exactly half its own 56, which is a geometric constraint rather than a ladder rung and does not move + with the rest of this file's radii. + + ◆ Gradient and glow since v5, matching Button.primary rather than staying a flat fill once that one + moved. The two are the only accent-filled controls on this head and are read as one idea — "the thing + this surface wants you to do" — so a flat FAB beside a gradient primary button would be the seam this + codebase's palette file keeps warning about, one screenshot over from the button it echoes. The glow + reads as well on a floating circle as it does on a bar-anchored rectangle: if anything a control that + already floats over content earns a lift more than one sitting in a row of chrome does, so it is kept + rather than dropped for the FAB's own shape. Still only on HOSTS. The design puts a second one on S3 and that editor genuinely does not exist yet, so the style being here is not permission to draw one there. @@ -135,7 +186,6 @@ - @@ -145,8 +195,14 @@ + + @@ -194,7 +250,7 @@ --> @@ -205,7 +261,7 @@ --> @@ -231,7 +287,7 @@ - + @@ -267,11 +323,17 @@ Checked is a filled surface with accent *text*, not an accent fill. v2 makes that distinction everywhere — see the remark on AccentText in Palette.axaml — and a chip is where it matters most: a row of four solid blue lozenges is a row of four things that all look like the primary action. + + ◆ Its own radius rather than Border.tag's or Button.chiptoggle's, despite the name. v2 drew this control + on the ladder's button-or-pill rung rather than its tag rung — 9, not 4 — and the v5 pass carries the + same rung forward to 10 rather than to Border.tag's 6: it is a much larger control at 34 tall against a + tag's line-height, and a radius picked for a 34-pixel chip is not the one a 20-pixel tag needs, whatever + the class is called. See the remark on Phone.axaml's own ladder, above. --> - - + @@ -288,7 +297,10 @@ PhoneShell.ShowsShellStrip, which is where that "and" is made, Avalonia's bindings having none. --> - + @@ -297,7 +309,7 @@ - -