We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Data editing tool.
Currently, TabBar does not show text tooltips for tabs. It would be useful to be able to set custom text tooltips.
TabBar
Also it would be useful to display a text tooltip with the tab title if the max tab width limit is set and the title does not fit.
Need to override the get_tooltip method and add two new set_tab_tooltip & get_tab_tooltip methods to TabBar.
get_tooltip
set_tab_tooltip
get_tab_tooltip
String TabBar::get_tooltip(const Point2 &p_pos) const { for (int i = 0; i < tabs.size(); i++) { if (tabs[i].hidden) { continue; } if (get_tab_rect(i).has_point(p_pos)) { if (tabs[i].tooltip.is_empty()) { return tabs[i].text; } return tabs[i].tooltip; } } return Control::get_tooltip(p_pos); }
Yes. It is possible to inherit from TabBar and override the _get_tooltip method.
_get_tooltip
No.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the project you are working on
Data editing tool.
Describe the problem or limitation you are having in your project
Currently,
TabBar
does not show text tooltips for tabs. It would be useful to be able to set custom text tooltips.Also it would be useful to display a text tooltip with the tab title if the max tab width limit is set and the title does not fit.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Need to override the
get_tooltip
method and add two newset_tab_tooltip
&get_tab_tooltip
methods toTabBar
.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes. It is possible to inherit from
TabBar
and override the_get_tooltip
method.Is there a reason why this should be core and not an add-on in the asset library?
No.
The text was updated successfully, but these errors were encountered: