From 19d0f4816a9485930a7821ba4e8d7065c46ae9a3 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Fri, 18 Aug 2023 14:35:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=A8=D0=B8=D1=80=D0=B8=D0=BD=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/scrl-threats.gd | 2 +- table/table.gd | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scenes/scrl-threats.gd b/scenes/scrl-threats.gd index aae24301..7723141a 100644 --- a/scenes/scrl-threats.gd +++ b/scenes/scrl-threats.gd @@ -11,7 +11,7 @@ const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader, Tabl const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit ] ## Описание ряда. const TABLE_COLUMN_PARAM = ['id', 'aoa', 'freq', 'proto' ] ## Параметры цели отображаемые в таблице. const TABLE_HEADERS_TEXT = ['Номер', 'Пеленг', 'Частота, МГц', 'Протокол' ] ## Заголовки таблицы. -const TABLE_COLUMN_SIZE = [ 50, 140, 140, 100 ] ## Ширины колонок. +const TABLE_COLUMN_SIZE = [ 60, 140, 140, 90 ] ## Ширины колонок. func on_row_pressed(i_row: int): diff --git a/table/table.gd b/table/table.gd index ecf84cba..b36936e0 100644 --- a/table/table.gd +++ b/table/table.gd @@ -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()