-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProgressBar draws 'progress' even when value is 0 #1296
Comments
|
Most things in imgui are drawn over the FrameBg color, that's the desired platforms. Your solution wouldn't easily be applicable to widgets like I'll look at how we can fix your first issue above.
Please use github attachment and no external link when possible, else the links will end up failing in the future, making things harder to refer to for others. |
Yeah, I know, it's for extreme situations like mine where I'm using it to draw a digital speedometer with the RPM value as the background. I'll just remove the code since it's off-topic.
Noted, I've edited the main post to have images of the issue. |
That function is literally 2 calls to RenderFrame() which is 1 call to draw_list->AddRectFilled(), if you are doing custom rendering you'd probably be better just doing the calls yourself instead of relying on ProgressBar. Looking at the rendering. |
This should be fixed now (with quite some pain to get the rendering right - but the resulting function will be useful for other stuff). |
Before all, I'm running version 1.51. ProgressBar draws an unexpected filled rectangle when the
fraction
value is 0 andstyle.FrameRounding
is greater than 0.0f. This also happens with the default theme. I tried to fix it but I failed.With FrameRounding:
Without FrameRounding:
gifs:
style.FrameRounding = 0.0f
style.FrameRounding > 0.0f
A dirty workaround for now is to use:
RenderFrame(bb.Min, fill_br, GetColorU32(ImGuiCol_PlotHistogram), false, fraction < 0.01f ? 0.0f : style.FrameRounding);
The text was updated successfully, but these errors were encountered: