Доработка. Ширина колонки

This commit is contained in:
sasha80
2023-08-18 14:35:15 +03:00
parent 2f6dc271da
commit 19d0f4816a
2 changed files with 5 additions and 6 deletions

View File

@@ -319,11 +319,11 @@ func add_row(row_types: Array) -> void:
var node = node_type.instantiate()
assert(node.name == node.name, 'ошибка: экземпляр не имеет поля \"name\"')
var head = nodes[HEAD_KEY_FORMAT % [0, i_col]]
custom_minimum_size.x = head.custom_minimum_size.x
node.set_deferred('size.x', head.size.x)
var node_key: String = NODE_KEY_FORMAT % [i_row, i_col]
node.name = node_key
add_child(node)
node.custom_minimum_size.x = head.custom_minimum_size.x
node.set_deferred('size.x', head.size.x)
nodes[node_key] = node
var conn = Callable(self, '_on_focus_entered').bind(node)
node.connect('focus_entered', conn)
@@ -346,11 +346,10 @@ func set_header(header_types: Array):
var do_adj: = false
if not header:
header = GridContainer.new()
header.position = position
header.columns = header_types.size()
header.size.x = size.x
var parent = scroll.get_parent()
parent.add_child(header)
header.position = position
header.columns = header_types.size()
do_adj = true
else:
var childrens = header.get_children()