imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Moving DockingSplitterSize to ImGuiStyle

Open wobbier opened this issue 4 years ago • 3 comments

Hey! I got into styling ImGui quite a bit, and needed to modify the thickness of the docking splitter.

I moved the existing global variable into the style, I've updated the various places it was used, and added it to the style tab in imgui_demo.cpp

My only notes/questions are:

  • Did I miss anything? 🥲
  • There's a spot in code where I've updated a comment that's questioning the relation to the splitter size and I'm not completely sure what eventually calls ImGui::DockNodeTreeFindVisibleNodeByPos, so I left it alone for now
  • const float dock_spacing = 0.0f;// g.Style.ItemInnerSpacing.x; // FIXME: Relation to Style.DockingSplitterSize?

Example Ik544P236z

wobbier avatar Nov 14 '21 23:11 wobbier

Ah, Just found this PR: https://github.com/ocornut/imgui/pull/3481

wobbier avatar Nov 15 '21 00:11 wobbier

Thanks! Yes this seems like a duplicate of #3481. I'll investigate both and will pick the most suitable but as highlighted in #3481 the "tricky" part was figuring out a parameter design for those inner/outer settings. Will look at this before next version.

ocornut avatar Nov 15 '21 10:11 ocornut

I personally think this should be a separate option (a single float), and we add a second ImVec2 for the "docking space padding". If the user wants them to be the same size, they can input that themselves.

Unless you're talking about docked panels having their own inner / outer spacing different from padding?

wobbier avatar Nov 16 '21 06:11 wobbier

Closed this see comment https://github.com/ocornut/imgui/pull/3481#issuecomment-1630599394 Haven't found a satisfying solution for outer one yet (also see that comment).

ocornut avatar Jul 11 '23 10:07 ocornut