mirror of
https://github.com/godotengine/godot.git
synced 2026-02-07 19:32:36 +00:00
Use Core/Scene stringnames consistently
This commit is contained in:
@@ -290,7 +290,7 @@ void EditorSpinSlider::_update_value_input_stylebox() {
|
||||
// Add a left margin to the stylebox to make the number align with the Label
|
||||
// when it's edited. The LineEdit "focus" stylebox uses the "normal" stylebox's
|
||||
// default margins.
|
||||
Ref<StyleBox> stylebox = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->duplicate();
|
||||
Ref<StyleBox> stylebox = get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate();
|
||||
// EditorSpinSliders with a label have more space on the left, so add an
|
||||
// higher margin to match the location where the text begins.
|
||||
// The margin values below were determined by empirical testing.
|
||||
@@ -310,7 +310,7 @@ void EditorSpinSlider::_draw_spin_slider() {
|
||||
bool rtl = is_layout_rtl();
|
||||
Vector2 size = get_size();
|
||||
|
||||
Ref<StyleBox> sb = get_theme_stylebox(is_read_only() ? SNAME("read_only") : SNAME("normal"), SNAME("LineEdit"));
|
||||
Ref<StyleBox> sb = get_theme_stylebox(is_read_only() ? SNAME("read_only") : CoreStringName(normal), SNAME("LineEdit"));
|
||||
if (!flat) {
|
||||
draw_style_box(sb, Rect2(Vector2(), size));
|
||||
}
|
||||
@@ -513,7 +513,7 @@ LineEdit *EditorSpinSlider::get_line_edit() {
|
||||
}
|
||||
|
||||
Size2 EditorSpinSlider::get_minimum_size() const {
|
||||
Ref<StyleBox> sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"));
|
||||
Ref<StyleBox> sb = get_theme_stylebox(CoreStringName(normal), SNAME("LineEdit"));
|
||||
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("LineEdit"));
|
||||
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("LineEdit"));
|
||||
|
||||
@@ -712,10 +712,10 @@ void EditorSpinSlider::_ensure_input_popup() {
|
||||
value_input->set_focus_mode(FOCUS_CLICK);
|
||||
value_input_popup->add_child(value_input);
|
||||
value_input->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
|
||||
value_input_popup->connect("hidden", callable_mp(this, &EditorSpinSlider::_value_input_closed));
|
||||
value_input_popup->connect(SceneStringName(hidden), callable_mp(this, &EditorSpinSlider::_value_input_closed));
|
||||
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
|
||||
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
|
||||
value_input->connect("gui_input", callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
|
||||
value_input->connect(SceneStringName(focus_exited), callable_mp(this, &EditorSpinSlider::_value_focus_exited));
|
||||
value_input->connect(SceneStringName(gui_input), callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
|
||||
|
||||
if (is_inside_tree()) {
|
||||
_update_value_input_stylebox();
|
||||
@@ -729,7 +729,7 @@ EditorSpinSlider::EditorSpinSlider() {
|
||||
grabber->hide();
|
||||
grabber->set_as_top_level(true);
|
||||
grabber->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
|
||||
grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
|
||||
grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
|
||||
grabber->connect(SceneStringName(mouse_entered), callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
|
||||
grabber->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
|
||||
grabber->connect(SceneStringName(gui_input), callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user