-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
TreeNode with arbitrarily sized Icon between arrow and text #4519
Comments
Hello, How do you expect things to look with an icon that's significantly bigger? Normally TreeNode adjust for the text baseline and height of the line.
Larger padding to make it more visible
vs
We're missing helper functions to explicitly manipulate text baseline without touching other things. |
Anything would be fine really, for now the issue is that I can't find a way to do |
I'm struggling to understand how "32 px icon 13 px text" can look right on a same line so it is a bizarre thing to aim at IHMO but either way it should be possible. I'm looking at it and there's a bug in ImGui::ColorButton("##Image", ImVec4(1, 0, 0, 1), 0, ImVec2(60,60)); // Imagine this is an image
ImGui::SameLine();
if (ImGui::TreeNode("TreeNode"))
ImGui::TreePop(); You could argue that in some situation you'd want the tree node to cover the entire height and in some situations not. Right now it's always doing the later. The effect of that code in TreeNodeBehavior makes it (currently) impossible for the node to cover more than the typical framed height (text height + padding * 2). It's a problematic limitation. I'll see what I can come up with (won't be able today but I'll try this week). (And I argue it would be nice to refactor TreeNodeBehavior into something less messy and more flexible) |
any solution? i really like ImGui::TreeNode with textureid param.. that will be lit |
Hello :) I am trying to create a widget tree with icons embedded in the TreeNode headers. The catch is that those icons are significantly bigger than the main font, and this is why so far I haven't found any way to achieve this result with Imgui
If you have any advice on how I could possibly achieve this result, even by customizing some Imgui code somewhere, it would be greatly appreciated !
The text was updated successfully, but these errors were encountered: