-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Docking: Added DockingSplitterSize to ImGuiStyle Struct #3481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: docking
Are you sure you want to change the base?
Docking: Added DockingSplitterSize to ImGuiStyle Struct #3481
Conversation
also useful for touch screens |
Hello @PossiblyAShrub and thanks for the PR. The reason I didn't expose this value in style was that various mock-ups I received from users suggested that in some instances we also want an outer-most border using this same spacing value. Currently the way we use that value is for separator/splitter only. The larger we make the value, the more likely it is that a designer/UI/visual person will want outer spacing to follow. I haven't dug much further yet but that's the general idea/reason why it's not yet done the way you suggested it. |
I'd suggest that we have a separate value for the outer-padding to allow more flexibility. Now that I think about it, isn't there a way to do outer padding using the existing styling? |
I've added support for outer padding (in dock spaces only). I think the extra padding looks quite nice, and helps to decongest everything. Right now I've made a distinction between inner (between windows) and outer (between the dock space and docked windows.) I'm not sure if we want it this way, or perhaps they'd be better combined into one (as a float or ImVec2.) |
Looks beautiful! It's nice to have them separate for beautification's sake. (Most every tiling window manger keeps them separate too - so this convention is standard...) How is the outer padding styled? Can we make it transparent? |
cc: @ChristianIvicevic who expressed interested in this too. |
4a6447b
to
6822493
Compare
I have now merged a5aff5f + small amends b79751e which basically constitute the first commit of your PR. I haven't merged the second commit: there's no handling of outer padding in floating dock node, which I believe might need to be a third exposed value. The main problem is that rendering that for floating dock node is a little more difficult than for dockspaces (where you found a single easy/suitable) change + we may need to clarify which colors are used where, as our attempt at it for dockspaces used WindowBg. I'll close #2522 and #4721 but leave this open for now. Thanks! |
I also spent a lot of time tweaking various style parameters to achieve this until I stumbled over this thread. |
That’s not true. |
To be honest, answers like this one are the reason why I avoid posting here. It makes me feel stupid. Anyways. This is how it looks on my side... 2024-07-11.20-02-04-1.mp4 |
I must apologize. the intent is never to make anyone feel stupid. But we answer many messages and don't always have time to massage them in feedback sandwich, and I tend to try to focus on cold facts. And in fact I happen to be wrong occasionally. In this precise situation: I was the "stupid" (or wrong) one since your statement is actually true at least in the situation which matters to you here. Only for In fact I think I should go and make this selection based on |
I'm sorry for my earlier remark. I had a rough day and was slightly thin skinned. And yes, I should have started a new issue with proper code example instead of writing a comment without any meaningful context. |
I have personally preferred more spacing between my docked windows (ie. a larger docking splitter size) I also have noticed that I am not the only one wishing for this feature (see #2109 (comment))
Previously I would simply change the
DOCKING_SPLITTER_SIZE
definition (inimgui.cpp
), while this did work, it required me to change Dear ImGui source code.All I've done is add the
DockingSplitterSize
field to theImGuiStyle
struct. Then I updated some of the docking code to use this new field. Finally I added a corresponding slider in the style editor. Here's a gif of the result: