mirror of
https://github.com/godotengine/godot.git
synced 2025-01-12 20:22:49 +08:00
Merge pull request #36039 from YeldhamDev/tree_text_clip_fix
Fix text clipping in Tree items not working with negative values
This commit is contained in:
commit
480bfbd42e
@ -1121,7 +1121,7 @@ void Tree::draw_item_rect(const TreeItem::Cell &p_cell, const Rect2i &p_rect, co
|
||||
}
|
||||
|
||||
rect.position.y += Math::floor((rect.size.y - font->get_height()) / 2.0) + font->get_ascent();
|
||||
font->draw(ci, rect.position, text, p_color, rect.size.x);
|
||||
font->draw(ci, rect.position, text, p_color, MAX(0, rect.size.width));
|
||||
}
|
||||
|
||||
int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 &p_draw_size, TreeItem *p_item) {
|
||||
|
Loading…
Reference in New Issue
Block a user