-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Handle IsSameLine in Separator() #7360
base: master
Are you sure you want to change the base?
Conversation
I don't think it's a simple one, as "how to handle it" is subject to design and intuitively I didn't expect you to use an vertical separator for this case, but merely to adjust the start X1 position of the horizontal line. So I was surprised by the content of the PR, but it means there's at least two different ways to do things, if not more. It would be good to have more context about your use case, but perhaps the better answer for it is to expose a VSeparator() function or the separator flags.
Yes that part would be inconsistent. However tedious it is to call I would argue we should further push to make horizontal layout mode a public API (along with other planned layout mode but the others will requires bigger code change). |
I meant
Right. This is currently what If the behavior above ("A B C ----") doesn't work or is hard to make use it, that gives us some flexibility to decide that a default could be dynamically switching depending on context. The work here is mostly to consider many use cases and design an API as future-proof as possible.
I don't disagree, but same problem: like with many unfinished features the difficult is designing the future proof API. |
This is a simple one, but I can't find any reason IsSameLine shouldn't be handled in Separator.
One thing I am not sure about is the SameLine() call at the end of Separator if we used SameLine() before. Although I don't see a practical reason to not restore IsSameLine state, it feels weird that specifically Separator wants to keep things on the same line even though all the other widgets do not (that I am aware of).
I haven't tested this in weird cases, are there edge cases maybe that I should be aware of?