Coder Social home page Coder Social logo

Comments (6)

ocornut avatar ocornut commented on May 14, 2024 3

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.

ocornut avatar ocornut commented on May 14, 2024

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.

ebriney avatar ebriney commented on May 14, 2024

Perhaps this is because my window has the ImGuiWindowFlags_NoResize flags indeed.

from imgui.

ocornut avatar ocornut commented on May 14, 2024

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.

ebriney avatar ebriney commented on May 14, 2024

A flag is ok, but you should assert if size <= 0 or set this flag.

from imgui.

ocornut avatar ocornut commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.