Skip to content

DecorationProvider example: Allow for scale when sizing background text#4941

Open
AlanGriffiths wants to merge 1 commit into
mainfrom
fix-text-scale-in-decorations-provider
Open

DecorationProvider example: Allow for scale when sizing background text#4941
AlanGriffiths wants to merge 1 commit into
mainfrom
fix-text-scale-in-decorations-provider

Conversation

@AlanGriffiths
Copy link
Copy Markdown
Contributor

With HIDPI screens limiting the maximum number of physical pixels a character can take is annoying: the text is small.

Copilot AI review requested due to automatic review settings May 8, 2026 18:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the DecorationProvider example’s help-text rendering so the font sizing is no longer artificially constrained on HiDPI displays, aiming to make the on-background instructions more readable when output scaling is in use.

Changes:

  • Add a BackgroundInfo::buffer_scale() accessor (currently unused).
  • Remove the fixed 20-pixel cap from the FreeType pixel-size calculation used for help text.

Comment thread examples/example-server-lib/decoration_provider.cpp
Comment thread examples/example-server-lib/decoration_provider.cpp
@AlanGriffiths AlanGriffiths force-pushed the fix-text-scale-in-decorations-provider branch from 872a37d to 84f749b Compare May 8, 2026 20:46
@AlanGriffiths AlanGriffiths requested a review from Copilot May 9, 2026 06:42
@AlanGriffiths AlanGriffiths force-pushed the fix-text-scale-in-decorations-provider branch from 84f749b to b58f0bc Compare May 9, 2026 06:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

2 participants