Skip to content

fix:(lock): add portrait layout support for vertical monitors#1567

Open
Mestane wants to merge 3 commits into
caelestia-dots:mainfrom
Mestane:fix/lock-portrait-layout
Open

fix:(lock): add portrait layout support for vertical monitors#1567
Mestane wants to merge 3 commits into
caelestia-dots:mainfrom
Mestane:fix/lock-portrait-layout

Conversation

@Mestane

@Mestane Mestane commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The lock screen layout was designed around landscape monitors and doesn't adapt to vertical/portrait displays. On a rotated monitor the surface is sized off screen.height, which is the long edge in portrait, so the content overflows and the side columns get squeezed against the center.

So I made the lock surface orientation-aware it now sizes against the monitor's short edge regardless of rotation, and stacks the modules vertically when the screen is in portrait.

Approach

The core fix is sizing against the monitor's short edge (min(width, height)) instead of screen.height that's the dimension the design actually scales against, and screen.height only happens to match it in landscape. Orientation is detected with a plain width < height check, avoiding the undocumented lastIpcObject.transform field.

For portrait, a separate vertical layout stacks the modules top-to-bottom: weather + resources, the clock/password block, fetch + notifications, then media. The landscape layout is untouched.

Notes

Landscape behavior is unchanged on a 1440p monitor the short edge resolves to 1440 and the scale to 1.0, identical to before, so this is a no-op for existing setups.

Tested on a dual-monitor setup with one landscape (DP-2) and one portrait display (DP-3, transform = 1).

Before After
before after

@Mestane Mestane force-pushed the fix/lock-portrait-layout branch from a4842d7 to f89fd11 Compare June 13, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant