Skip to content
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

ImGui resizes itself to git content when setting size to 0. #7454

Closed
SamHoque opened this issue Mar 29, 2024 · 3 comments
Closed

ImGui resizes itself to git content when setting size to 0. #7454

SamHoque opened this issue Mar 29, 2024 · 3 comments

Comments

@SamHoque
Copy link

Version/Branch of Dear ImGui:

Version 1.90.4, Branch: master

Back-ends:

imgui_impl_opengl3.cpp + imgui_impl_win32.cpp

Compiler, OS:

Windows 11 + CMake (Using Ninja)

Full config/build information:

No response

Details:

My Issue/Question:

When setting the size of ImGui to 0, 0 using SetWindowSize it resizes itself to fit the content, attached a gif, the size should be 0,0 but it resizes itself to make the checkbox visible.

Screenshots/Video:

ui framework

Minimal, Complete and Verifiable Example code:

ImGui::Begin(name.c_str(), nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
ImGui::SetWindowSize(ImVec2(0, 0));
ImGui::End();
@SamHoque
Copy link
Author

Setting It to ImVec2(1, 1) works just fine. I might just use that, if its not possible to completely resize it to 0.

@SamHoque
Copy link
Author

GUMTAmXamQ.mp4

would be nice, if I could get it to resize even smaller, but also adding a lerp to the alpha, it doesn't look half as bad.

@ocornut
Copy link
Owner

ocornut commented Mar 29, 2024

Sorry but #1586

@ocornut ocornut closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants