Skip to content
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

Does docking tabs support something like ImGuiTabBarFlags_FittingPolicyScroll? #3421

Open
coolxv opened this issue Aug 20, 2020 · 4 comments
Labels

Comments

@coolxv
Copy link

coolxv commented Aug 20, 2020

#3414 (comment)

image

@ocornut
Copy link
Owner

ocornut commented Aug 20, 2020 via email

@ocornut
Copy link
Owner

ocornut commented Sep 25, 2020

If you modify the code in DockNodeUpdateTabBar() to add the ImGuiTabBarFlags_FittingPolicyScroll scroll to the tab bar:

ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_AutoSelectNewTabs;
tab_bar_flags |= ImGuiTabBarFlags_SaveSettings | ImGuiTabBarFlags_DockNode;
tab_bar_flags |= ImGuiTabBarFlags_FittingPolicyScroll;

It seems to work:

image

However I don't know what would be a suitable design here.
We could have a global style setting to specify the default for tab bars created by the docking system., however I don't think always-on scrolling behavior is very desirable.

@frink
Copy link
Contributor

frink commented Sep 25, 2020

We could have a global style setting to specify the default for tab bars created by the docking system., however I don't think always-on scrolling behavior is very desirable.

I like the idea of a global style for the tabs and also agree that always on scroll is not desirable. Generally we probably only want scrolling if the tabs take up more room than we have to display...
But do we know that before we render?

@ocornut
Copy link
Owner

ocornut commented Sep 26, 2020

Generally we probably only want scrolling if the tabs take up more room than we have to display...

This is already the case, but I don't think that's sufficient. The ideal solution would combine both shrinking and scrolling.

@ocornut ocornut added the tabs tab bars, tabs label Sep 30, 2020
@ocornut ocornut added the style label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants