[Scene] Add SceneStringNames::font(_size/_color)
This commit is contained in:
@ -1231,8 +1231,8 @@ void EditorAudioStreamPicker::_notification(int p_what) {
|
||||
void EditorAudioStreamPicker::_update_resource() {
|
||||
EditorResourcePicker::_update_resource();
|
||||
|
||||
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
|
||||
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
|
||||
Ref<Font> font = get_theme_font(SceneStringName(font), SNAME("Label"));
|
||||
int font_size = get_theme_font_size(SceneStringName(font_size), SNAME("Label"));
|
||||
Ref<AudioStream> audio_stream = get_edited_resource();
|
||||
if (audio_stream.is_valid() && audio_stream->get_length() > 0.0) {
|
||||
set_assign_button_min_size(Size2(1, font->get_height(font_size) * 3));
|
||||
@ -1250,12 +1250,12 @@ void EditorAudioStreamPicker::_preview_draw() {
|
||||
return;
|
||||
}
|
||||
|
||||
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
|
||||
int font_size = get_theme_font_size(SceneStringName(font_size), SNAME("Label"));
|
||||
|
||||
get_assign_button()->set_text("");
|
||||
|
||||
Size2i size = stream_preview_rect->get_size();
|
||||
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
|
||||
Ref<Font> font = get_theme_font(SceneStringName(font), SNAME("Label"));
|
||||
|
||||
Rect2 rect(Point2(), size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user