From debc074e7bd6ad1713af045e2622dc2cef2f23b5 Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+TokisanGames@users.noreply.github.com> Date: Tue, 2 Jul 2024 02:00:26 +0700 Subject: [PATCH] Fix sliders bouncing around. Cause was SIZE_EXPAND --- project/addons/terrain_3d/src/tool_settings.gd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/project/addons/terrain_3d/src/tool_settings.gd b/project/addons/terrain_3d/src/tool_settings.gd index 7856cf47e..ad9a19596 100644 --- a/project/addons/terrain_3d/src/tool_settings.gd +++ b/project/addons/terrain_3d/src/tool_settings.gd @@ -363,6 +363,7 @@ func add_setting(p_args: Dictionary) -> void: SettingType.PICKER: var button := Button.new() + button.set_v_size_flags(SIZE_SHRINK_CENTER) button.icon = load(PICKER_ICON) button.tooltip_text = "Pick value from the Terrain" button.pressed.connect(_on_pick.bind(p_default)) @@ -398,7 +399,6 @@ func add_setting(p_args: Dictionary) -> void: spin_slider.set_step(p_step) spin_slider.set_value(p_default) spin_slider.set_suffix(p_suffix) - spin_slider.set_h_size_flags(SIZE_SHRINK_CENTER) spin_slider.set_v_size_flags(SIZE_SHRINK_CENTER) spin_slider.set_custom_minimum_size(Vector2(75, 0)) @@ -415,8 +415,6 @@ func add_setting(p_args: Dictionary) -> void: else: # DOUBLE_SLIDER var label := Label.new() - label.set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER) - label.set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER) label.set_custom_minimum_size(Vector2(75, 0)) slider = DoubleSlider.new() slider.label = label @@ -431,7 +429,6 @@ func add_setting(p_args: Dictionary) -> void: slider.set_step(p_step) slider.set_value(p_default) slider.set_v_size_flags(SIZE_SHRINK_CENTER) - slider.set_h_size_flags(SIZE_SHRINK_END | SIZE_EXPAND) slider.set_custom_minimum_size(Vector2(60, 10)) control.name = p_name.to_pascal_case()