Overview
Beyond basic color and style modifications, Dear ImGui provides powerful customization capabilities including DPI scaling, custom rendering, and advanced theming techniques.DPI Scaling
Font Scaling
Since v1.92 (June 2025), fonts may be dynamically used at any size. Select default size:Style Scaling
For single viewport applications, you can scale all sizes once:If you need to change the scaling factor, reset the style and call
ScaleAllSizes() again with a new value.DPI-Aware Windows Applications
On Windows, you must inform the OS that your application is DPI aware:SDL2
SDL2
Pass
SDL_WINDOW_ALLOW_HIGHDPI flag to SDL_CreateWindow() and call ::SetProcessDPIAware().SDL3
SDL3
Pass
SDL_WINDOW_HIGH_PIXEL_DENSITY flag to SDL_CreateWindow().GLFW
GLFW
DPI awareness is handled automatically by GLFW.
Other Windows Projects
Other Windows Projects
Use
ImGui_ImplWin32_EnableDpiAwareness() helper or an application manifest file.Conditional Styling
Apply different styles based on widget state:Style Stack Management
Use a counter to manage complex push/pop sequences:Custom Widget Appearance
Invisible Buttons
Create clickable areas without visual button appearance:Borderless Windows
Custom Colors and Themes
Creating a Custom Theme
Theme Selector
Using Reference Values
Avoid hardcoded sizes by using reference values:Custom Rendering
For complete control over appearance, use the low-level ImDrawList API:Anti-Aliasing Options
Control rendering quality:Disabling anti-aliasing can improve performance on resource-constrained systems.
Style Persistence
Save and load custom styles:Debug and Development
Style Editor
Use the built-in editor during development:Style Selector
Quickly switch between built-in themes:Getting Style Colors
Retrieve current color values:Performance Considerations
See Also
- Colors and Styles - Complete color and style reference
- Performance - Performance optimization techniques
- Best Practices - General ImGui best practices