Giter VIP home page Giter VIP logo

Comments (4)

llunS avatar llunS commented on June 16, 2024 1

The PR is open.

And as a complete unrelated side note, consider removing the SetNextWindowPos and SetNextWindowSize in showFileDialog(), because in my use case with Multi-Viewport feature enabled in IMGUI, this will allow for the window size and position being persisted between dialog opening sessions and application sessions since it is persisted in imgui.ini instead of being fixed each time the dialog is open.

from imgui-addons.

gallickgunner avatar gallickgunner commented on June 16, 2024 1

Thanks for the PR. It's merged. I'll look into the function calls you mentioned when I get back to it. Happy coding.

from imgui-addons.

gallickgunner avatar gallickgunner commented on June 16, 2024

Hi, nice find. I'm currently busy due to transitioning my workspace to linux so don't really have time to fix this. You can open up a PR maybe?

I think the scrollbar is appearing because of

float cw_height = std::min<float>(4.0f * frame_height, cw_content_height);

Currently it's being set to a maximum of 4 * frame_height. In case of the number of extension being 4 or less, the child window height is being set the same as the content height. I think the scrollbars appear when the size of the content is the same or exceeds the window height. You could try adding a small factor to the window height to always make it bigger than the content incase the content has less than 4 extensions by doing

float cw_height = std::min<float>(4.0f * frame_height, cw_content_height) + delta // delta = a small amount like frame_height/2;

If that doesn't work, you can always try passing the no scrollbar option to the BeginChild function when you have 4 or less extesnsions.

from imgui-addons.

llunS avatar llunS commented on June 16, 2024

I will be opening up a PR this day or two, using your advice and tweak it a bit if it doesn't work.
Then we will see how it goes by the time the PR is open.

from imgui-addons.

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.