Skip to content

Conversation

@prybicki
Copy link

The demo used hardcoded pixel values for several plots which didn't scale with DPI, causing them to appear too small on high-DPI displays.

Following ImGui's convention, this commit replaces hardcoded pixel values with ImGui::GetTextLineHeight() multiplied by appropriate factors. This ensures plots scale correctly with font size and DPI settings.

Affected plots:

  • PolitiFact: Who Lies More? (400px -> 25*TextLineHeight)
  • Pie charts (250x250px -> 16*TextLineHeight square)
  • Heatmaps (225x225px -> 14*TextLineHeight square)
  • Scrolling/Rolling plots (150px -> 10*TextLineHeight)
  • DragRects/DragPoints plots (150px -> 10*TextLineHeight)
  • Drag and Drop plots (195px -> 13*TextLineHeight)

This follows the same pattern used throughout ImGui's demo code for ensuring DPI-aware sizing.

The demo used hardcoded pixel values for several plots which didn't scale
with DPI, causing them to appear too small on high-DPI displays.

Following ImGui's convention, this commit replaces hardcoded pixel values
with ImGui::GetTextLineHeight() multiplied by appropriate factors. This
ensures plots scale correctly with font size and DPI settings.

Affected plots:
- PolitiFact: Who Lies More? (400px -> 25*TextLineHeight)
- Pie charts (250x250px -> 16*TextLineHeight square)
- Heatmaps (225x225px -> 14*TextLineHeight square)
- Scrolling/Rolling plots (150px -> 10*TextLineHeight)
- DragRects/DragPoints plots (150px -> 10*TextLineHeight)
- Drag and Drop plots (195px -> 13*TextLineHeight)

This follows the same pattern used throughout ImGui's demo code for
ensuring DPI-aware sizing.
@prybicki
Copy link
Author

Before:
image

After:
image

@brenocq brenocq added type:fix Something isn't working prio:high High priority status:review The task is under review labels Nov 7, 2025
@brenocq brenocq added this to the v0.17 milestone Nov 7, 2025
@brenocq brenocq self-requested a review November 7, 2025 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prio:high High priority status:review The task is under review type:fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants