Skip to content

Commit c2fc978

Browse files
committed
Style: Default style is now StyleColorsDark()! Toward a 1.60 release :) (#707)
1 parent 0734a12 commit c2fc978

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

CHANGELOG.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Breaking Changes:
5050
If you were adding or subtracting to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
5151
- BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
5252
- Obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render(). Use ImGui::GetDrawData() to retrieve the ImDrawData* to display.
53-
- Reorganized context handling to be more explicit,
53+
- Reorganized context handling to be more explicit, (#1599)
5454
- YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
5555
- removed Shutdown() function, as DestroyContext() serve this purpose.
5656
- you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwhise CreateContext() will create its own font atlas instance.
@@ -86,10 +86,10 @@ Other Changes:
8686
- Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
8787
- Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
8888
- Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
89-
- Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565)
89+
- Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565, #1599)
9090
YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END. Existing apps will assert/crash without it.
91-
- Context: Removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions() and shared by all contexts. (#1565, #586, #992, #1007, #1558)
92-
- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it.
91+
- Context: Added SetAllocatorFunctions() to rewire memory allocators (as a replacement to previous parameters to CreateContext()). Allocators are shared by all contexts and imgui helpers. (#1565, #586, #992, #1007, #1558)
92+
- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
9393
- Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
9494
- IO: Added io.ConfigFlags for user application to store settings for imgui and for the back-end:
9595
- ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
@@ -111,6 +111,7 @@ Other Changes:
111111
- InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), Ctrl+Insert (copy), Shift+Insert (paste). (#1541)
112112
- InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
113113
- InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values using scientific notation. Automatically used by InputFloat.
114+
- Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
114115
- Style: Enable window border by default. (#707)
115116
- Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
116117
- Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).

imgui.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,8 @@ ImGuiStyle::ImGuiStyle()
837837
AntiAliasedFill = true; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
838838
CurveTessellationTol = 1.25f; // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
839839

840-
ImGui::StyleColorsClassic(this);
840+
// Default theme
841+
ImGui::StyleColorsDark(this);
841842
}
842843

843844
// To scale your entire UI (e.g. if you want your app to use High DPI or generally be DPI aware) you may use this helper function. Scaling the fonts is done separately and is up to you.

imgui.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ namespace ImGui
162162
IMGUI_API const char* GetVersion(); // get a version string e.g. "1.23"
163163

164164
// Styles
165-
IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL); // new, recommended style
166-
IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL); // old, classic imgui style (default)
165+
IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL); // new, recommended style (default)
166+
IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL); // classic imgui style
167167
IMGUI_API void StyleColorsLight(ImGuiStyle* dst = NULL); // best used with borders and a custom, thicker font
168168

169169
// Windows
@@ -570,13 +570,13 @@ enum ImGuiWindowFlags_
570570
ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y)
571571
ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x)
572572
ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
573-
ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // (WIP) Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.
573+
ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // [BETA] Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.
574574
ImGuiWindowFlags_NoNavInputs = 1 << 18, // No gamepad/keyboard navigation within the window
575575
ImGuiWindowFlags_NoNavFocus = 1 << 19, // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
576576
ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
577577

578578
// [Internal]
579-
ImGuiWindowFlags_NavFlattened = 1 << 23, // (WIP) Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
579+
ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
580580
ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild()
581581
ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip()
582582
ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup()

0 commit comments

Comments
 (0)