You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add EditorStringNames singleton
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
@@ -204,13 +205,13 @@ void ThemeEditorPreview::_notification(int p_what) {
|
||||
[[fallthrough]];
|
||||
}
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
picker_button->set_icon(get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons")));
|
||||
picker_button->set_icon(get_editor_theme_icon(SNAME("ColorPick")));
|
||||
|
||||
theme_cache.preview_picker_overlay = get_theme_stylebox(SNAME("preview_picker_overlay"), SNAME("ThemeEditor"));
|
||||
theme_cache.preview_picker_overlay_color = get_theme_color(SNAME("preview_picker_overlay_color"), SNAME("ThemeEditor"));
|
||||
theme_cache.preview_picker_label = get_theme_stylebox(SNAME("preview_picker_label"), SNAME("ThemeEditor"));
|
||||
theme_cache.preview_picker_font = get_theme_font(SNAME("status_source"), SNAME("EditorFonts"));
|
||||
theme_cache.font_size = get_theme_font_size(SNAME("font_size"), SNAME("EditorFonts"));
|
||||
theme_cache.preview_picker_font = get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts));
|
||||
theme_cache.font_size = get_theme_font_size(SNAME("font_size"), EditorStringName(EditorFonts));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_PROCESS: {
|
||||
@@ -282,7 +283,7 @@ void DefaultThemeEditorPreview::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
test_color_picker_button->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor"))));
|
||||
test_color_picker_button->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), EditorStringName(Editor))));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
@@ -485,7 +486,7 @@ void SceneThemeEditorPreview::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
reload_scene_button->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
|
||||
reload_scene_button->set_icon(get_editor_theme_icon(SNAME("Reload")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user