mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix truncation of node name in bezier animation editor
This commit is contained in:
parent
7a228b4b91
commit
35441fda1b
1 changed files with 5 additions and 8 deletions
|
|
@ -430,18 +430,15 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
|
||||||
node = root->get_node(path);
|
node = root->get_node(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text;
|
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
int ofs = 0;
|
int ofs = h_separation;
|
||||||
|
|
||||||
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(node);
|
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(node);
|
||||||
|
|
||||||
text = node->get_name();
|
TextLine text_buf = TextLine(node->get_name(), font, font_size);
|
||||||
ofs += h_separation;
|
int total_icon_width = icon->get_width() + solo->get_width() + visibility_visible->get_width() + lock->get_width() + remove->get_width();
|
||||||
|
int total_icon_separation = h_separation * 5;
|
||||||
TextLine text_buf = TextLine(text, font, font_size);
|
text_buf.set_width(limit - ofs - total_icon_width - total_icon_separation);
|
||||||
text_buf.set_width(limit - ofs - icon->get_width() - h_separation);
|
|
||||||
|
|
||||||
int h = MAX(text_buf.get_size().y, icon->get_height());
|
int h = MAX(text_buf.get_size().y, icon->get_height());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue