Skip to content

Keep compass ruler label inside the window - #678

Merged
JanuszBedkowski merged 1 commit into
mainfrom
mp/fix_compass_ruler_label_clipped
Dec 4, 2026
Merged

JanuszBedkowski merged 1 commit into
mainfrom
mp/fix_compass_ruler_label_clipped

Conversation

@michalpelka

Copy link
Copy Markdown
Contributor

Fixes #672.

The scale-bar label in the bottom-left compass/ruler widget (raylib_widgets, shared by all raylib apps) was drawn 6 px below a bar placed 10 px from the bottom edge, with a 14 px font, so its lower ~10 px fell off-screen.

The widget is now laid out from the bottom edge up (margin, label, gap, bar, compass), and the label is centered under the bar.

User-visible: the compass and ruler sit 14 px higher than before; the scale label is fully readable.

Not changed (possible follow-ups): label font size on HiDPI, and the bar being a fixed 80 px regardless of the length it labels.

Not yet tested on macOS / Windows.

🤖 Generated with Claude Code

The ruler label was drawn 6 px below a bar placed 10 px from the bottom
edge with a 14 px font, so its lower part fell off-screen. Lay out the
widget from the bottom edge up and center the label under the bar.

Fixes #672

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JanuszBedkowski
JanuszBedkowski merged commit 6675e0e into main Dec 4, 2026
7 checks passed
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.

I can not see scale

2 participants