-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix Tree minimum size calculation #91095
Conversation
As long as there is a tooltip that displays the full title of a node with a title longer than can be displayed, I think 'no horizontal scrollbar' is the preferred fix. Horizontal scrolling is simply always cumbersome IMO. EDIT: clarified what I meant with 'this fix'. |
min_size.y += bg->get_margin(SIDE_TOP) + bg->get_margin(SIDE_BOTTOM); | ||
} | ||
return Vector2(h_scroll_enabled ? 0 : min_size.x, v_scroll_enabled ? 0 : min_size.y); | ||
Vector2 min_size = Vector2(0, _get_title_button_height()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be ignored when vertical scroll is enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vertical scrollbar does not scroll the title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, but otherwise looks ok.
(I didn't test extensively though)
Needs rebase to fix CI. |
- Take scroll bar space and column title buttons into account - Fix first column min size sometimes missing one level of indent - Fix cell min size ignoring text overrun behavior and item inner margin - Update min size when `hide_root` or `column_title_visible` changes Wrong description of `item_inner_margin_*` constants is also fixed
Thanks! |
Fixes #91047
hide_root
orcolumn_title_visible
changesAlso fixed wrong description of
item_inner_margin_*
constants. They are actually applied to cells instead of items (rows) in the PR that introduced them. The naming is unfortunate, but I don't think it's worth breaking compat for.This PR accidentially fixed the problem that Scene dock uses both text ellipsis and horizontal scrollbar (and the scrollbar did not allow you to see the whole text) 🤣
If the horizontal scrollbar is preferred, all we need to do is setting the text overrun behavior to "no trimming".