Skip to content

Comments

Fix OSD positioning on rotated displays#181

Merged
ErikReider merged 1 commit intoErikReider:mainfrom
0xMNT:fix-rotated-positioning
Nov 21, 2025
Merged

Fix OSD positioning on rotated displays#181
ErikReider merged 1 commit intoErikReider:mainfrom
0xMNT:fix-rotated-positioning

Conversation

@0xMNT
Copy link
Contributor

@0xMNT 0xMNT commented Nov 9, 2025

Anchor to bottom instead of top edge to avoid issues with window.allocated_height() returning 0 during initialization.

The top_margin parameter still works the same way - 0.85 means 85% from top (15% from bottom with bottom anchoring).

Improves on b14eba7 which fixed visibility but had positioning issues.

Anchor to bottom instead of top edge to avoid issues with
window.allocated_height() returning 0 during initialization.

The top_margin parameter still works the same way - 0.85 means
85% from top (15% from bottom with bottom anchoring).

Improves on b14eba7 which fixed visibility but had positioning issues.
@AstronautSloth
Copy link

++ This change also fixes the issue I'm seeing regarding the positioning of the OSD on my hidpi laptop display (2880x1920) where the OSD only renders between the top and middle of the screen depending on the value of top_margin

@willnorris
Copy link

I'm pretty sure window.allocated_height always returns 0. The problem with visibility issues is because gtk is reporting the wrong monitor scaling when rotated. My investigation notes at #135 (comment)

But this certainly is probably the simplest solution... just offset from the bottom. I like it!

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart! Thanks for the quick fix! :D

@ErikReider ErikReider merged commit f56791c into ErikReider:main Nov 21, 2025
2 checks passed
@0xMNT 0xMNT deleted the fix-rotated-positioning branch November 24, 2025 17:29
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.

4 participants