mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
ProgressBar() fixed rendering when straddling rounded area. (#1296)
This commit is contained in:
parent
01d4bf299a
commit
f8eef49575
@ -7323,7 +7323,7 @@ void ImGui::ProgressBar(float fraction, const ImVec2& size_arg, const char* over
|
|||||||
RenderFrame(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
|
RenderFrame(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
|
||||||
bb.Expand(ImVec2(-window->BorderSize, -window->BorderSize));
|
bb.Expand(ImVec2(-window->BorderSize, -window->BorderSize));
|
||||||
const ImVec2 fill_br = ImVec2(ImLerp(bb.Min.x, bb.Max.x, fraction), bb.Max.y);
|
const ImVec2 fill_br = ImVec2(ImLerp(bb.Min.x, bb.Max.x, fraction), bb.Max.y);
|
||||||
RenderFrame(bb.Min, fill_br, GetColorU32(ImGuiCol_PlotHistogram), false, style.FrameRounding);
|
RenderRectFilledRangeH(window->DrawList, bb, GetColorU32(ImGuiCol_PlotHistogram), 0.0f, fraction, style.FrameRounding);
|
||||||
|
|
||||||
// Default displaying the fraction as percentage string, but user can override it
|
// Default displaying the fraction as percentage string, but user can override it
|
||||||
char overlay_buf[32];
|
char overlay_buf[32];
|
||||||
|
Loading…
Reference in New Issue
Block a user