Merge pull request #91965 from aaronp64/tooltip_size

Fix tooltip content being cut off at some display scales
This commit is contained in:
Rémi Verschelde 2024-08-16 10:33:25 +02:00
commit a86c3e44dd
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -1511,6 +1511,7 @@ void Viewport::_gui_show_tooltip() {
r.size *= win_scale; r.size *= win_scale;
vr = window->get_usable_parent_rect(); vr = window->get_usable_parent_rect();
} }
r.size = r.size.ceil();
r.size = r.size.min(panel->get_max_size()); r.size = r.size.min(panel->get_max_size());
if (r.size.x + r.position.x > vr.size.x + vr.position.x) { if (r.size.x + r.position.x > vr.size.x + vr.position.x) {