mirror of
https://github.com/Relintai/godot-resources-as-sheets-plugin.git
synced 2025-04-08 17:41:50 +02:00
The color cell's preview panel returns
This commit is contained in:
parent
1b36e5a7cc
commit
c10bb18003
@ -10,16 +10,14 @@ func create_cell(caller : Control) -> Control:
|
||||
node.custom_minimum_size.x = 56
|
||||
node.add_child(color)
|
||||
color.name = "Color"
|
||||
call_deferred("_resize_color_rect", color)
|
||||
call_deferred(&"_resize_color_rect", color)
|
||||
return node
|
||||
|
||||
|
||||
func _resize_color_rect(rect):
|
||||
if !is_instance_valid(rect): return # Table refreshed twice, probably? Either way, this fix is easier
|
||||
rect.size = Vector2(8, 0)
|
||||
rect.anchors_preset = Control.PRESET_LEFT_WIDE
|
||||
await rect.get_tree().process_frame
|
||||
rect.size.x = 8
|
||||
rect.set_anchors_and_offsets_preset(Control.PRESET_LEFT_WIDE, Control.PRESET_MODE_KEEP_WIDTH)
|
||||
|
||||
|
||||
func can_edit_value(value, type, property_hint, property_hint_string) -> bool:
|
||||
|
Loading…
Reference in New Issue
Block a user