diff options
-rw-r--r-- | editor/editor_spin_slider.cpp | 14 | ||||
-rw-r--r-- | modules/gdnavigation/gd_navigation_server.cpp | 9 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 1 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp | 12 |
4 files changed, 33 insertions, 3 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index bb8bcdfe6c..bdd5c57b43 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -31,6 +31,7 @@ #include "editor_spin_slider.h" #include "core/math/expression.h" #include "core/os/input.h" +#include "editor_node.h" #include "editor_scale.h" String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const { @@ -185,6 +186,19 @@ void EditorSpinSlider::_notification(int p_what) { } } + if (p_what == NOTIFICATION_READY) { + // 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<StyleBoxFlat> stylebox = + EditorNode::get_singleton()->get_theme_base()->get_stylebox("normal", "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. + stylebox->set_default_margin(MARGIN_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE); + value_input->add_style_override("normal", stylebox); + } + if (p_what == NOTIFICATION_DRAW) { updown_offset = -1; diff --git a/modules/gdnavigation/gd_navigation_server.cpp b/modules/gdnavigation/gd_navigation_server.cpp index 2780e2a931..5bafa5507c 100644 --- a/modules/gdnavigation/gd_navigation_server.cpp +++ b/modules/gdnavigation/gd_navigation_server.cpp @@ -115,12 +115,15 @@ GdNavigationServer::GdNavigationServer() : NavigationServer(), + commands_mutex(Mutex::create()), + operations_mutex(Mutex::create()), active(true) { - commands_mutex = Mutex::create(); - operations_mutex = Mutex::create(); } -GdNavigationServer::~GdNavigationServer() {} +GdNavigationServer::~GdNavigationServer() { + memdelete(operations_mutex); + memdelete(commands_mutex); +} void GdNavigationServer::add_command(SetCommand *command) const { auto mut_this = const_cast<GdNavigationServer *>(this); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 68c12c38fa..2e903b6867 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -667,6 +667,7 @@ void ColorPicker::set_presets_visible(bool p_visible) { presets_visible = p_visible; preset_separator->set_visible(p_visible); preset_container->set_visible(p_visible); + preset_container2->set_visible(p_visible); } bool ColorPicker::are_presets_visible() const { diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp index e3c3cdf0bf..d329fa5779 100644 --- a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp @@ -2697,8 +2697,20 @@ RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() { RD::get_singleton()->free(view_dependant_uniform_set); } + storage->free(wireframe_material_shader); + storage->free(overdraw_material_shader); + storage->free(default_shader); + + storage->free(wireframe_material); + storage->free(overdraw_material); + storage->free(default_material); + { RD::get_singleton()->free(scene_state.reflection_buffer); + memdelete_arr(scene_state.instances); + memdelete_arr(scene_state.gi_probes); + memdelete_arr(scene_state.directional_lights); + memdelete_arr(scene_state.lights); memdelete_arr(scene_state.reflections); } } |