mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Keep right-to-left credits clear of the corner row and the readout
From review, checked in headless Chromium at 1100-1920px wide, Tactical and Minimal, left to right and right to left, with a credit line long enough to wrap: - Right to left with the Minimal HUD the credits stayed bottom left, under the language picker and Power Up: the Minimal placement's two IDs outweighed the right-to-left rule, which now matches it. - Right to left from 1200px a wrapped credit line ran into the Tactical bottom-right readout (AIS); the readout sits 1.5rem higher there. - The left rail no longer reads a top pin no stylesheet sets since Cyber went; VUE-MIGRATION no longer lists the removed cyberTheme test, and CURRENT-STATE notes the narrow-screen credit line that does not wrap (as on main). Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
d68adcea21
commit
ea3d543e13
7 files changed
+38
-13
No files matched your search
@@ -317,21 +317,16 @@ export function layoutLeftPanelRail({
|
||||
stack.style.setProperty('--left-stack-safe-bottom', bottomValue);
|
||||
}
|
||||
// The rail stays where the resting stack puts it; only the panels move.
|
||||
// A theme that pins the stack's top (Cyber) leaves nothing to offset.
|
||||
const topPinned =
|
||||
getComputedStyle(stack)
|
||||
.getPropertyValue?.('--panel-stack-top-pinned')
|
||||
?.trim() === '1';
|
||||
// The stack itself rises by the lift below, by a different amount for a
|
||||
// tall panel than at rest; the rail takes up the difference.
|
||||
const lift = (top) => Math.min(0, obstacleSafeTop - top);
|
||||
const railOffset = `${(topPinned ? 0 : safeTop + lift(safeTop) - layoutTop - lift(layoutTop)).toFixed(1)}px`;
|
||||
const railOffset = `${(safeTop + lift(safeTop) - layoutTop - lift(layoutTop)).toFixed(1)}px`;
|
||||
if (stack.style.getPropertyValue('--panel-rail-offset') !== railOffset) {
|
||||
stack.style.setProperty('--panel-rail-offset', railOffset);
|
||||
}
|
||||
// How far the column can rise before it meets the HUD readout, so the rail
|
||||
// and any open panel sit just under it, whether or not a panel is open.
|
||||
const railLift = `${(topPinned ? 0 : lift(layoutTop)).toFixed(1)}px`;
|
||||
const railLift = `${lift(layoutTop).toFixed(1)}px`;
|
||||
if (stack.style.getPropertyValue('--panel-rail-lift') !== railLift) {
|
||||
stack.style.setProperty('--panel-rail-lift', railLift);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user