Skip to content

examples/*.c do not support HiDPI displays on Retina/4K displays #506

@qiekn

Description

@qiekn

Describe the bug
Most of the examples in raygui do not adapt correctly to HiDPI (Retina/4K) displays. On such displays, GUI elements appear bigger than intended.

To Reproduce
Steps to reproduce the behavior:

  1. Compile any example, e.g., controls_test_suite.c.
  2. Run it on a HiDPI monitor.
  3. Observe that GUI elements are scaled incorrectly.
Image

Suggested fix
Add the following line before InitWindow in each example .c file:

SetConfigFlags(FLAG_WINDOW_HIGHDPI);

This ensures that GUI elements are scaled properly on HiDPI displays, preventing confusion for new users who might otherwise see overly large or mis-scaled UI when first running the examples.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions