Skip to content

Remove hardcoded ImGui menu width constraint#1991

Merged
alecjacobson merged 1 commit intolibigl:mainfrom
abhimadan:imgui-menu-width-scaling
Mar 14, 2022
Merged

Remove hardcoded ImGui menu width constraint#1991
alecjacobson merged 1 commit intolibigl:mainfrom
abhimadan:imgui-menu-width-scaling

Conversation

@abhimadan
Copy link
Copy Markdown
Contributor

The ImGuiMenu class currently constraints the width to a hardcoded value, and also enables auto-resizing. Both of these settings overlap, in that they both prevent the user from resizing the ImGui menu, but the width constraint effectively overrides the auto-resizing feature, which sets the width at a potentially undesirable value (e.g., wide content can be truncated). Removing the width constraint and just letting ImGui resize the menu automatically seems to be a good approach. I've only tested this on some code in a private repo that I don't want to share publicly, but I am happy to write up a simple example demonstrating the change, or discuss an alternative approach (e.g., perhaps a user might want to set a maximum width constraint or manually fix the width on their end).

Checklist

  • All changes meet libigl style-guidelines.
  • Adds new .cpp file.
  • Adds corresponding unit test.
  • This is a minor change.

@alecjacobson alecjacobson merged commit b7e94cb into libigl:main Mar 14, 2022
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

Successfully merging this pull request may close these issues.

2 participants