Skip to content

Commit 790f2b9

Browse files
committed
Merge branch 'master' into docking
2 parents 4806a19 + d467950 commit 790f2b9

8 files changed

+44
-21
lines changed

Diff for: docs/CHANGELOG.txt

+14
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ HOW TO UPDATE?
3535
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
3636
- Please report any issue!
3737

38+
-----------------------------------------------------------------------
39+
VERSION 1.92.0 WIP (In Progress)
40+
-----------------------------------------------------------------------
41+
42+
Breaking changes:
43+
44+
Other changes:
45+
46+
- Error Handling: added better error report and recovery for extraneous
47+
EndPopup() call. (#1651, #8499)
48+
- Style, InputText: added ImGuiCol_InputTextCursor to configure color of
49+
the InputText cursor/caret. (#7031)
50+
51+
3852
-----------------------------------------------------------------------
3953
VERSION 1.91.9b (Released 2025-03-17)
4054
-----------------------------------------------------------------------

Diff for: imgui.cpp

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91.9b
1+
// dear imgui, v1.92.0 WIP
22
// (main code and documentation)
33

44
// Help:
@@ -3610,6 +3610,7 @@ const char* ImGui::GetStyleColorName(ImGuiCol idx)
36103610
case ImGuiCol_ResizeGrip: return "ResizeGrip";
36113611
case ImGuiCol_ResizeGripHovered: return "ResizeGripHovered";
36123612
case ImGuiCol_ResizeGripActive: return "ResizeGripActive";
3613+
case ImGuiCol_InputTextCursor: return "InputTextCursor";
36133614
case ImGuiCol_TabHovered: return "TabHovered";
36143615
case ImGuiCol_Tab: return "Tab";
36153616
case ImGuiCol_TabSelected: return "TabSelected";
@@ -5847,7 +5848,7 @@ static void ImGui::RenderDimmedBackgrounds()
58475848
if (window->DrawList->CmdBuffer.Size == 0)
58485849
window->DrawList->AddDrawCmd();
58495850
window->DrawList->PushClipRect(viewport->Pos, viewport->Pos + viewport->Size);
5850-
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), window->WindowRounding, 0, 3.0f);
5851+
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), window->WindowRounding, 0, 3.0f); // FIXME-DPI
58515852
window->DrawList->PopClipRect();
58525853
}
58535854

@@ -12485,8 +12486,11 @@ void ImGui::EndPopup()
1248512486
{
1248612487
ImGuiContext& g = *GImGui;
1248712488
ImGuiWindow* window = g.CurrentWindow;
12488-
IM_ASSERT(window->Flags & ImGuiWindowFlags_Popup); // Mismatched BeginPopup()/EndPopup() calls
12489-
IM_ASSERT(g.BeginPopupStack.Size > 0);
12489+
if ((window->Flags & ImGuiWindowFlags_Popup) == 0 || g.BeginPopupStack.Size == 0)
12490+
{
12491+
IM_ASSERT_USER_ERROR(0, "Calling EndPopup() too many times or in wrong window!");
12492+
return;
12493+
}
1249012494

1249112495
// Make all menus and popups wrap around for now, may need to expose that policy (e.g. focus scope could include wrap/loop policy flags used by new move requests)
1249212496
if (g.NavWindow == window)
@@ -15011,7 +15015,7 @@ void ImGui::RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_r
1501115015
bool push_clip_rect = !window->ClipRect.Contains(bb_display);
1501215016
if (push_clip_rect)
1501315017
window->DrawList->PushClipRectFullScreen();
15014-
window->DrawList->AddRect(bb_display.Min, bb_display.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f);
15018+
window->DrawList->AddRect(bb_display.Min, bb_display.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f); // FIXME-DPI
1501515019
if (push_clip_rect)
1501615020
window->DrawList->PopClipRect();
1501715021
}

Diff for: imgui.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91.9b
1+
// dear imgui, v1.92.0 WIP
22
// (headers)
33

44
// Help:
@@ -28,7 +28,7 @@
2828

2929
// Library Version
3030
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
31-
#define IMGUI_VERSION "1.91.9b"
31+
#define IMGUI_VERSION "1.92.0 WIP"
3232
#define IMGUI_VERSION_NUM 19191
3333
#define IMGUI_HAS_TABLE
3434
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
@@ -1722,6 +1722,7 @@ enum ImGuiCol_
17221722
ImGuiCol_ResizeGrip, // Resize grip in lower-right and lower-left corners of windows.
17231723
ImGuiCol_ResizeGripHovered,
17241724
ImGuiCol_ResizeGripActive,
1725+
ImGuiCol_InputTextCursor, // InputText cursor/caret
17251726
ImGuiCol_TabHovered, // Tab background, when hovered
17261727
ImGuiCol_Tab, // Tab background, when tab-bar is focused & tab is unselected
17271728
ImGuiCol_TabSelected, // Tab background, when tab-bar is focused & tab is selected

Diff for: imgui_demo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91.9b
1+
// dear imgui, v1.92.0 WIP
22
// (demo code)
33

44
// Help:

Diff for: imgui_draw.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91.9b
1+
// dear imgui, v1.92.0 WIP
22
// (drawing and font code)
33

44
/*
@@ -217,6 +217,7 @@ void ImGui::StyleColorsDark(ImGuiStyle* dst)
217217
colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.20f);
218218
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
219219
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
220+
colors[ImGuiCol_InputTextCursor] = colors[ImGuiCol_Text];
220221
colors[ImGuiCol_TabHovered] = colors[ImGuiCol_HeaderHovered];
221222
colors[ImGuiCol_Tab] = ImLerp(colors[ImGuiCol_Header], colors[ImGuiCol_TitleBgActive], 0.80f);
222223
colors[ImGuiCol_TabSelected] = ImLerp(colors[ImGuiCol_HeaderActive], colors[ImGuiCol_TitleBgActive], 0.60f);
@@ -282,6 +283,7 @@ void ImGui::StyleColorsClassic(ImGuiStyle* dst)
282283
colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.10f);
283284
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.78f, 0.82f, 1.00f, 0.60f);
284285
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.78f, 0.82f, 1.00f, 0.90f);
286+
colors[ImGuiCol_InputTextCursor] = colors[ImGuiCol_Text];
285287
colors[ImGuiCol_TabHovered] = colors[ImGuiCol_HeaderHovered];
286288
colors[ImGuiCol_Tab] = ImLerp(colors[ImGuiCol_Header], colors[ImGuiCol_TitleBgActive], 0.80f);
287289
colors[ImGuiCol_TabSelected] = ImLerp(colors[ImGuiCol_HeaderActive], colors[ImGuiCol_TitleBgActive], 0.60f);
@@ -348,6 +350,7 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
348350
colors[ImGuiCol_ResizeGrip] = ImVec4(0.35f, 0.35f, 0.35f, 0.17f);
349351
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
350352
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
353+
colors[ImGuiCol_InputTextCursor] = colors[ImGuiCol_Text];
351354
colors[ImGuiCol_TabHovered] = colors[ImGuiCol_HeaderHovered];
352355
colors[ImGuiCol_Tab] = ImLerp(colors[ImGuiCol_Header], colors[ImGuiCol_TitleBgActive], 0.90f);
353356
colors[ImGuiCol_TabSelected] = ImLerp(colors[ImGuiCol_HeaderActive], colors[ImGuiCol_TitleBgActive], 0.60f);

Diff for: imgui_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91.9b
1+
// dear imgui, v1.92.0 WIP
22
// (internal structures/api)
33

44
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

Diff for: imgui_tables.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91b
1+
// dear imgui, v1.92.0 WIP
22
// (tables and columns code)
33

44
/*

Diff for: imgui_widgets.cpp

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.91b
1+
// dear imgui, v1.92.0 WIP
22
// (widgets code)
33

44
/*
@@ -867,11 +867,12 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos)
867867
if (hovered)
868868
window->DrawList->AddRectFilled(bb.Min, bb.Max, bg_col);
869869
RenderNavCursor(bb, id, ImGuiNavRenderCursorFlags_Compact);
870-
ImU32 cross_col = GetColorU32(ImGuiCol_Text);
871-
ImVec2 cross_center = bb.GetCenter() - ImVec2(0.5f, 0.5f);
872-
float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f;
873-
window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, +cross_extent), cross_center + ImVec2(-cross_extent, -cross_extent), cross_col, 1.0f);
874-
window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, -cross_extent), cross_center + ImVec2(-cross_extent, +cross_extent), cross_col, 1.0f);
870+
const ImU32 cross_col = GetColorU32(ImGuiCol_Text);
871+
const ImVec2 cross_center = bb.GetCenter() - ImVec2(0.5f, 0.5f);
872+
const float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f;
873+
const float cross_thickness = 1.0f; // FIXME-DPI
874+
window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, +cross_extent), cross_center + ImVec2(-cross_extent, -cross_extent), cross_col, cross_thickness);
875+
window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, -cross_extent), cross_center + ImVec2(-cross_extent, +cross_extent), cross_col, cross_thickness);
875876

876877
return pressed;
877878
}
@@ -1484,7 +1485,7 @@ bool ImGui::TextLink(const char* label)
14841485
}
14851486

14861487
float line_y = bb.Max.y + ImFloor(g.Font->Descent * g.FontScale * 0.20f);
1487-
window->DrawList->AddLine(ImVec2(bb.Min.x, line_y), ImVec2(bb.Max.x, line_y), GetColorU32(line_colf)); // FIXME-TEXT: Underline mode.
1488+
window->DrawList->AddLine(ImVec2(bb.Min.x, line_y), ImVec2(bb.Max.x, line_y), GetColorU32(line_colf)); // FIXME-TEXT: Underline mode // FIXME-DPI
14881489

14891490
PushStyleColor(ImGuiCol_Text, GetColorU32(text_colf));
14901491
RenderText(bb.Min, label, label_end);
@@ -5345,7 +5346,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
53455346
ImVec2 cursor_screen_pos = ImTrunc(draw_pos + cursor_offset - draw_scroll);
53465347
ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y - g.FontSize + 0.5f, cursor_screen_pos.x + 1.0f, cursor_screen_pos.y - 1.5f);
53475348
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect))
5348-
draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_Text));
5349+
draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_InputTextCursor), 1.0f); // FIXME-DPI: Cursor thickness (#7031)
53495350

53505351
// Notify OS of text input position for advanced IME (-1 x offset so that Windows IME can cover our cursor. Bit of an extra nicety.)
53515352
if (!is_readonly)
@@ -6214,7 +6215,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
62146215
if (g.Style.FrameBorderSize > 0.0f)
62156216
RenderFrameBorder(bb.Min, bb.Max, rounding);
62166217
else
6217-
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color buttons are often in need of some sort of border
6218+
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color buttons are often in need of some sort of border // FIXME-DPI
62186219
}
62196220

62206221
// Drag and Drop Source
@@ -7493,7 +7494,7 @@ void ImGui::EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flag
74937494
ImRect box_select_r = bs->BoxSelectRectCurr;
74947495
box_select_r.ClipWith(scope_rect);
74957496
window->DrawList->AddRectFilled(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_SeparatorHovered, 0.30f)); // FIXME-MULTISELECT: Styling
7496-
window->DrawList->AddRect(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_NavCursor)); // FIXME-MULTISELECT: Styling
7497+
window->DrawList->AddRect(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_NavCursor)); // FIXME-MULTISELECT FIXME-DPI: Styling
74977498

74987499
// Scroll
74997500
const bool enable_scroll = (ms_flags & ImGuiMultiSelectFlags_ScopeWindow) && (ms_flags & ImGuiMultiSelectFlags_BoxSelectNoScroll) == 0;

0 commit comments

Comments
 (0)