Skip to main content

Overview

This page documents all fields in the ImGuiStyle structure. For usage patterns and common customizations, see Style.

ImGuiStyle Structure

struct ImGuiStyle
{
    // Font scaling
    float       FontSizeBase;
    float       FontScaleMain;
    float       FontScaleDpi;
    
    // Global alpha
    float       Alpha;
    float       DisabledAlpha;
    
    // Windows
    ImVec2      WindowPadding;
    float       WindowRounding;
    float       WindowBorderSize;
    float       WindowBorderHoverPadding;
    ImVec2      WindowMinSize;
    ImVec2      WindowTitleAlign;
    ImGuiDir    WindowMenuButtonPosition;
    
    // Child windows
    float       ChildRounding;
    float       ChildBorderSize;
    
    // Popups
    float       PopupRounding;
    float       PopupBorderSize;
    
    // Frames
    ImVec2      FramePadding;
    float       FrameRounding;
    float       FrameBorderSize;
    
    // Spacing
    ImVec2      ItemSpacing;
    ImVec2      ItemInnerSpacing;
    ImVec2      CellPadding;
    ImVec2      TouchExtraPadding;
    float       IndentSpacing;
    float       ColumnsMinSpacing;
    
    // Scrollbars
    float       ScrollbarSize;
    float       ScrollbarRounding;
    float       ScrollbarPadding;
    
    // Sliders & Grabs
    float       GrabMinSize;
    float       GrabRounding;
    float       LogSliderDeadzone;
    
    // Images
    float       ImageRounding;
    float       ImageBorderSize;
    
    // Tabs
    float       TabRounding;
    float       TabBorderSize;
    float       TabMinWidthBase;
    float       TabMinWidthShrink;
    float       TabCloseButtonMinWidthSelected;
    float       TabCloseButtonMinWidthUnselected;
    float       TabBarBorderSize;
    float       TabBarOverlineSize;
    
    // Tables
    float       TableAngledHeadersAngle;
    ImVec2      TableAngledHeadersTextAlign;
    
    // Trees
    ImGuiTreeNodeFlags TreeLinesFlags;
    float       TreeLinesSize;
    float       TreeLinesRounding;
    
    // Drag & Drop
    float       DragDropTargetRounding;
    float       DragDropTargetBorderSize;
    float       DragDropTargetPadding;
    
    // Color
    float       ColorMarkerSize;
    ImGuiDir    ColorButtonPosition;
    
    // Alignment
    ImVec2      ButtonTextAlign;
    ImVec2      SelectableTextAlign;
    
    // Separator
    float       SeparatorSize;
    float       SeparatorTextBorderSize;
    ImVec2      SeparatorTextAlign;
    ImVec2      SeparatorTextPadding;
    
    // Display
    ImVec2      DisplayWindowPadding;
    ImVec2      DisplaySafeAreaPadding;
    float       MouseCursorScale;
    
    // Anti-aliasing
    bool        AntiAliasedLines;
    bool        AntiAliasedLinesUseTex;
    bool        AntiAliasedFill;
    
    // Tessellation
    float       CurveTessellationTol;
    float       CircleTessellationMaxError;
    
    // Colors
    ImVec4      Colors[ImGuiCol_COUNT];
    
    // Behaviors
    float             HoverStationaryDelay;
    float             HoverDelayShort;
    float             HoverDelayNormal;
    ImGuiHoveredFlags HoverFlagsForTooltipMouse;
    ImGuiHoveredFlags HoverFlagsForTooltipNav;
    
    // [Internal]
    float       _MainScale;
    float       _NextFrameFontSizeBase;
};

Font Fields

FontSizeBase
float
default:"13.0f"
Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify.
FontScaleMain
float
default:"1.0f"
Main global scale factor. May be set by application once, or exposed to end-user.
FontScaleDpi
float
default:"1.0f"
Additional global scale factor from viewport/monitor DPI. In docking branch: automatically overwritten when changing monitor DPI if io.ConfigDpiScaleFonts is enabled.

Alpha Fields

Alpha
float
default:"1.0f"
Global alpha applies to everything in Dear ImGui. Range: 0.0f to 1.0f.
DisabledAlpha
float
default:"0.6f"
Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.

Window Fields

WindowPadding
ImVec2
default:"(8, 8)"
Padding within a window.
WindowRounding
float
default:"0.0f"
Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to artifacts.
WindowBorderSize
float
default:"1.0f"
Thickness of border around windows. Generally set to 0.0f or 1.0f.
WindowBorderHoverPadding
float
default:"3.0f"
Hit-testing extent outside/inside resizing border. Extend determination of hovered window.
WindowMinSize
ImVec2
default:"(32, 32)"
Minimum window size. This is a global setting. Use SetNextWindowSizeConstraints() for per-window constraints.
WindowTitleAlign
ImVec2
default:"(0.0, 0.5)"
Alignment for title bar text. Defaults to left-aligned, vertically centered.
WindowMenuButtonPosition
ImGuiDir
default:"ImGuiDir_Left"
Side of the collapsing/docking button in the title bar (None/Left/Right).

Frame Fields

FramePadding
ImVec2
default:"(4, 3)"
Padding within a framed rectangle (used by most widgets).
FrameRounding
float
default:"0.0f"
Radius of frame corners rounding. Set to 0.0f to have rectangular frames.
FrameBorderSize
float
default:"0.0f"
Thickness of border around frames. Generally set to 0.0f or 1.0f.

Spacing Fields

ItemSpacing
ImVec2
default:"(8, 4)"
Horizontal and vertical spacing between widgets/lines.
ItemInnerSpacing
ImVec2
default:"(4, 4)"
Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
CellPadding
ImVec2
default:"(4, 2)"
Padding within a table cell. CellPadding.x is locked for entire table. CellPadding.y may be altered between rows.
TouchExtraPadding
ImVec2
default:"(0, 0)"
Expand reactive bounding box for touch-based systems where touch position is not accurate enough.
IndentSpacing
float
default:"21.0f"
Horizontal indentation when entering a tree node. Generally equals (FontSize + FramePadding.x*2).
ColumnsMinSpacing
float
default:"6.0f"
Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).

Scrollbar Fields

ScrollbarSize
float
default:"14.0f"
Width of the vertical scrollbar, Height of the horizontal scrollbar.
ScrollbarRounding
float
default:"9.0f"
Radius of grab corners for scrollbar.
ScrollbarPadding
float
default:"2.0f"
Padding of scrollbar grab within its frame (same for both axes).

Grab & Slider Fields

GrabMinSize
float
default:"12.0f"
Minimum width/height of a grab box for slider/scrollbar.
GrabRounding
float
default:"0.0f"
Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
LogSliderDeadzone
float
default:"4.0f"
The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.

Tab Fields

TabRounding
float
default:"4.0f"
Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
TabBorderSize
float
default:"0.0f"
Thickness of border around tabs.
TabMinWidthBase
float
default:"60.0f"
Minimum tab width, to make tabs larger than their contents. Tab bar buttons are not affected.
TabMinWidthShrink
float
default:"40.0f"
Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy.
TabBarBorderSize
float
default:"1.0f"
Thickness of tab-bar separator, which takes on the tab active color to denote focus.
TabBarOverlineSize
float
default:"2.0f"
Thickness of tab-bar overline, which highlights the selected tab.

Behavior Fields

HoverStationaryDelay
float
default:"0.15f"
Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
HoverDelayShort
float
default:"0.15f"
Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort).
HoverDelayNormal
float
default:"0.40f"
Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal).
HoverFlagsForTooltipMouse
ImGuiHoveredFlags
Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip() while using mouse.
HoverFlagsForTooltipNav
ImGuiHoveredFlags
Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip() while using keyboard/gamepad.

See Also

  • Style - Style functions and usage patterns
  • Colors - Color styling

Build docs developers (and LLMs) love