mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 13:49:54 +00:00
Merge pull request #113017 from YeldhamDev/finicky_little_thing
Fix extra spacing in author names when opening the asset dialog
This commit is contained in:
commit
edb6ae1f75
1 changed files with 10 additions and 2 deletions
|
|
@ -91,12 +91,14 @@ void EditorAssetLibraryItem::_notification(int p_what) {
|
||||||
author->add_theme_color_override("font_hover_color", Color(0.5, 0.5, 0.5));
|
author->add_theme_color_override("font_hover_color", Color(0.5, 0.5, 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
calculate_misc_links_ratio();
|
_calculate_misc_links_size();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_THEME_CHANGED:
|
|
||||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||||
_calculate_misc_links_size();
|
_calculate_misc_links_size();
|
||||||
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_RESIZED: {
|
||||||
calculate_misc_links_ratio();
|
calculate_misc_links_ratio();
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
@ -113,6 +115,8 @@ void EditorAssetLibraryItem::_calculate_misc_links_size() {
|
||||||
const int font_size = get_theme_font_size(SceneStringName(font_size), SNAME("Label"));
|
const int font_size = get_theme_font_size(SceneStringName(font_size), SNAME("Label"));
|
||||||
text_buf->add_string(price->get_text(), font, font_size);
|
text_buf->add_string(price->get_text(), font, font_size);
|
||||||
price_width = text_buf->get_line_width();
|
price_width = text_buf->get_line_width();
|
||||||
|
|
||||||
|
calculate_misc_links_ratio();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorAssetLibraryItem::calculate_misc_links_ratio() {
|
void EditorAssetLibraryItem::calculate_misc_links_ratio() {
|
||||||
|
|
@ -290,6 +294,10 @@ void EditorAssetLibraryItemDescription::_notification(int p_what) {
|
||||||
case NOTIFICATION_THEME_CHANGED: {
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
previews_bg->add_theme_style_override(SceneStringName(panel), previews->get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit")));
|
previews_bg->add_theme_style_override(SceneStringName(panel), previews->get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit")));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_POST_POPUP: {
|
||||||
|
callable_mp(item, &EditorAssetLibraryItem::calculate_misc_links_ratio).call_deferred();
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue