Kaynağa Gözat

Merge pull request #97212 from Riteo/picking-the-right-expand-mode

ColorPicker: Ignore TextureRect expand mode during legacy picking
Thaddeus Crews 10 ay önce
ebeveyn
işleme
814187de60
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      scene/gui/color_picker.cpp

+ 1 - 0
scene/gui/color_picker.cpp

@@ -1553,6 +1553,7 @@ void ColorPicker::_pick_button_pressed_legacy() {
 
 
 		picker_texture_rect = memnew(TextureRect);
 		picker_texture_rect = memnew(TextureRect);
 		picker_texture_rect->set_anchors_preset(Control::PRESET_FULL_RECT);
 		picker_texture_rect->set_anchors_preset(Control::PRESET_FULL_RECT);
+		picker_texture_rect->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
 		picker_window->add_child(picker_texture_rect);
 		picker_window->add_child(picker_texture_rect);
 		picker_texture_rect->set_default_cursor_shape(CURSOR_POINTING_HAND);
 		picker_texture_rect->set_default_cursor_shape(CURSOR_POINTING_HAND);
 		picker_texture_rect->connect(SceneStringName(gui_input), callable_mp(this, &ColorPicker::_picker_texture_input));
 		picker_texture_rect->connect(SceneStringName(gui_input), callable_mp(this, &ColorPicker::_picker_texture_input));