fix(cockpit): centre the phone Display/Radio row above the flight readouts

On phones (<=760 px) the collapsed Display/Radio launcher row was
right-anchored at bottom: 152px, off the Reset/Exit axis and on top of
the ground speed and altitude readouts. Centre it and anchor it above
the compass block through a shared --cockpit-compass-bottom variable;
only the launchers take pointer input. Cyber's top row is centred too.
This commit is contained in:
Denis Groshev committed 2026-11-04 16:25:38 +01:00
1 parent 4859ba4c94
commit 5738cdc45c
5 files changed
+83 -5

No files matched your search

+7 -1
View File
@@ -1137,10 +1137,16 @@ test('mobile Cockpit prioritizes flight instruments and collision-safe controls'
assert.match(mobileCockpit[1], /body\.cockpit-mode #intel-hud/);
assert.match(mobileCockpit[1], /body\.cockpit-mode \.cockpit-context-window/);
assert.match(mobileCockpit[1], /body\.cockpit-mode \.cockpit-signal-window/);
// The collapsed Display/Radio row is centred on the Reset/Exit axis and
// anchored above the compass block, not at a fixed offset that covered the
// ground speed and altitude readouts; the compass reads the same anchor.
assert.match(
mobileCockpit[1],
/body\.cockpit-mode \.cockpit-utility-controls[\s\S]*?bottom:\s*152px;/,
/body\.cockpit-mode \.cockpit-utility-controls \{[\s\S]*?bottom:\s*calc\(var\(--cockpit-compass-bottom\) \+ 182px\);[\s\S]*?left:\s*12px;[\s\S]*?justify-content:\s*center;/,
);
assert.doesNotMatch(mobileCockpit[1], /bottom:\s*152px;/);
assert.match(css, /\.cockpit-compass \{[\s\S]*?bottom:\s*var\(--cockpit-compass-bottom\);/);
assert.match(css, /--cockpit-compass-bottom:\s*clamp\(44px, 7vh, 72px\);/);
assert.match(
mobileCockpit[1],
/body\.cockpit-mode \.cockpit-utility-control\.is-expanded[\s\S]*?top:\s*96px;/,