Comments (6)
I made it that (0,0) perform auto-sizing even on a window with NoResize flag.
Also added a SetWindowSize() entry point.
Let me know if it's alright for you.
from imgui.
Could you clarify what you are reporting with code sample and a screenshot?
At the time of first creating a window with (0,0) size the window should automatically readjust to content size by gathering the maximum content frame over the next frame or two.
Double-clicking on a lower-right corner also fit the window.
However note that if your code is using window size to size widgets then auto-fitting create a feedback loop, so every auto-fitting will slightly readjust the window size.
from imgui.
Perhaps this is because my window has the ImGuiWindowFlags_NoResize flags indeed.
from imgui.
Correct! It currently skips all resizing behaviors with ImGuiWindowFlags_NoResize. Perhaps I should add a separate flag to distinguish manual user resize from initial auto-fit resize. Would you like that?
from imgui.
A flag is ok, but you should assert if size <= 0 or set this flag.
from imgui.
FYI I reorganised the Begin() functions which was full of traps (subtle ordering dependencies). It should be better and healthier now but there is the possibility that I've created bugs or changes of behavior related to window size. Let me know if you notice anything unusual.
The changes are spread over many commits ending with this
d84b573
(spreading them should make it easier to bissect for bugs shall we need to)
from imgui.
Related Issues (20)
- Selectable in nested table HOT 2
- Make sure InputText is selected without breaking buttons HOT 3
- Combo jitters inside Table when _SizingStretchProp is set HOT 4
- How to assign different window paddings in one window? HOT 1
- OpenGL Polygon Mode warning in Windows Opengl ES 3.0 HOT 4
- Image buttons - loop - no response - always false HOT 2
- Work around for peristent Centos/RHEL GLFW mouse offset issue? HOT 1
- ProgressBar with fraction == NaN leads to gigantic allocation HOT 1
- Resizing Widgets with SDL and Ogre HOT 1
- ImGui resizes itself to git content when setting size to 0. HOT 3
- How to set the clipboard functions to default ImGui implementation? HOT 5
- More than one BeginTabItem()s crashes program HOT 1
- Tracing back to the original pushed element ID HOT 5
- Font descriptor set of the backend is always null
- ImGui Windows being weird HOT 1
- Displaying Directory/Path Tree HOT 2
- Freeing memory from the SDL_Renderer HOT 4
- main.exe is not compatible with mi pc HOT 1
- Window Freeze using Multi Viewport and hidding main window
- Difference between backends? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui.