Skip to main content

Overview

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

ImGuiStyle Structure

Font Fields

float
default:"13.0f"
Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify.
float
default:"1.0f"
Main global scale factor. May be set by application once, or exposed to end-user.
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

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

Window Fields

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

Frame Fields

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

Spacing Fields

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

Scrollbar Fields

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

Grab & Slider Fields

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

Tab Fields

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

Behavior Fields

float
default:"0.15f"
Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
float
default:"0.15f"
Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort).
float
default:"0.40f"
Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal).
ImGuiHoveredFlags
Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip() while using mouse.
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