Skip to content

Commit

Permalink
Fixed InputTextMultiLine(), ListBox(), BeginChildFrame(): outer frame…
Browse files Browse the repository at this point in the history
… not honoring bordering (following #462)
  • Loading branch information
ocornut committed Apr 3, 2016
1 parent 07df3cf commit 947171d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ ImGuiStyle::ImGuiStyle()
WindowMinSize = ImVec2(32,32); // Minimum window size
WindowRounding = 9.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
WindowTitleAlign = ImGuiAlign_Left; // Alignment for title bar text
ChildWindowRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows
ChildWindowRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular child windows
FramePadding = ImVec2(4,3); // Padding within a framed rectangle (used by most widgets)
FrameRounding = 0.0f; // Radius of frame corners rounding. Set to 0.0f to have rectangular frames (used by most widgets).
ItemSpacing = ImVec2(8,4); // Horizontal and vertical spacing between widgets/lines
Expand Down Expand Up @@ -3442,13 +3442,14 @@ bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags ext
const ImGuiStyle& style = g.Style;
ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, style.Colors[ImGuiCol_FrameBg]);
ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, style.FrameRounding);
return ImGui::BeginChild(id, size, false, ImGuiWindowFlags_NoMove | extra_flags);
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
return ImGui::BeginChild(id, size, (g.CurrentWindow->Flags & ImGuiWindowFlags_ShowBorders) ? true : false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags);
}

void ImGui::EndChildFrame()
{
ImGui::EndChild();
ImGui::PopStyleVar();
ImGui::PopStyleVar(2);
ImGui::PopStyleColor();
}

Expand Down Expand Up @@ -7310,7 +7311,6 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
return false;
}
draw_window = GetCurrentWindow();
draw_window->DC.CursorPos += style.FramePadding;
size.x -= draw_window->ScrollbarSizes.x;
}
else
Expand Down

0 comments on commit 947171d

Please sign in to comment.