mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-28 10:14:11 +00:00
Merge branch 'master' into docking w/ custom fix in Scrollbar()
# Conflicts: # backends/imgui_impl_win32.cpp # imgui.cpp
This commit is contained in:
@@ -988,20 +988,8 @@ void ImGui::Scrollbar(ImGuiAxis axis)
|
||||
|
||||
// Calculate scrollbar bounding box
|
||||
ImRect bb = GetWindowScrollbarRect(window, axis);
|
||||
ImDrawFlags rounding_corners = ImDrawFlags_RoundCornersNone;
|
||||
if (axis == ImGuiAxis_X)
|
||||
{
|
||||
rounding_corners |= ImDrawFlags_RoundCornersBottomLeft;
|
||||
if (!window->ScrollbarY)
|
||||
rounding_corners |= ImDrawFlags_RoundCornersBottomRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar))
|
||||
rounding_corners |= ImDrawFlags_RoundCornersTopRight;
|
||||
if (!window->ScrollbarX)
|
||||
rounding_corners |= ImDrawFlags_RoundCornersBottomRight;
|
||||
}
|
||||
ImRect host_rect = (window->DockIsActive ? window->DockNode->HostWindow : window)->Rect();
|
||||
ImDrawFlags rounding_corners = CalcRoundingFlagsForRectInRect(bb, host_rect, g.Style.WindowBorderSize);
|
||||
float size_visible = window->InnerRect.Max[axis] - window->InnerRect.Min[axis];
|
||||
float size_contents = window->ContentSize[axis] + window->WindowPadding[axis] * 2.0f;
|
||||
ImS64 scroll = (ImS64)window->Scroll[axis];
|
||||
@@ -6491,6 +6479,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
||||
}
|
||||
|
||||
// Initialize/override default color options
|
||||
// FIXME: Could be moved to a simple IO field.
|
||||
void ImGui::SetColorEditOptions(ImGuiColorEditFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
Reference in New Issue
Block a user