From 0260fdd1c6c7198d60fcbd02cce82e4deb8954f4 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 24 Oct 2017 12:10:37 +0200 Subject: [PATCH] ColorButton: As a small convenience, provide a text baseline. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 15b1f9d9..b8bf8d58 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9419,7 +9419,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl if (size.y == 0.0f) size.y = default_size; const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); - ItemSize(bb); + ItemSize(bb, (size.y >= default_size) ? g.Style.FramePadding.y : 0.0f); if (!ItemAdd(bb, id)) return false;