-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
[Tree] Allow disabling auto generated tooltip for TreeItem
#97158
base: master
Are you sure you want to change the base?
[Tree] Allow disabling auto generated tooltip for TreeItem
#97158
Conversation
Thank You. |
Future improvement could involve checking the fit of the text, like is done in Lines 326 to 337 in 694d3c2
But that'd involve some more complex changes here so will leave that to a future improvement |
Since we already can set a custom tooltip, it may look like this. String ItemList::get_tooltip() {
if (auto_tooltip || not_fit) {
String item_tooltip = text;
if (!tooltip.is_empty()) {
item_tooltip += "\n" + tooltip;
}
return item_tooltip;
}
return tooltip;
}
|
I'll test some truncation code today and if it works out well I'll integrate it into this PR directly, but will keep it simple and match |
Haven't gotten around to digging into using truncation here so taking this out of draft on its own and will look at adding truncation checks when I can |
fd2981b
to
9abbcfe
Compare
9abbcfe
to
18bf023
Compare
The specifics of if the original behavior is desirable can be discussed, but this should be the most non-obtrusive approach to this, not disrupting existing behavior and just allowing you to configure this as wished
TreeItem
tooltip is repeating the item's text by default. #97154