Доработка. Светлая тема, перекрас элементов в table.gd.
This commit is contained in:
@@ -400,6 +400,7 @@ func add_row(row_types: Array) -> void:
|
||||
var conn = Callable(self, '_on_focus_entered').bind(node)
|
||||
node.connect('focus_entered', conn)
|
||||
set_node_meta(i_col, i_row, 'callable_focus_entered', conn)
|
||||
call_deferred("apply_theme")
|
||||
|
||||
|
||||
func _set_size_x_defered(node: Control, val: Vector2):
|
||||
@@ -410,6 +411,7 @@ func _set_size_x_defered(node: Control, val: Vector2):
|
||||
func _on_focus_entered(node):
|
||||
var indexes = get_key_indexes(node.name)
|
||||
emit_signal('row_pressed', indexes[1])
|
||||
ProjectSettings.connect('settings_changed', apply_theme)
|
||||
|
||||
|
||||
##
|
||||
@@ -519,6 +521,7 @@ func rehash():
|
||||
next_index(i_slct)
|
||||
nodes.clear()
|
||||
nodes.merge(nodes_copy)
|
||||
call_deferred('apply_theme')
|
||||
|
||||
|
||||
## Удаляет все строки таблицы
|
||||
@@ -714,3 +717,9 @@ func get_row_rect(i_row: int, rect: Array, key_format: String = NODE_KEY_FORMAT)
|
||||
rect[1] = cell0.position.y + scroll_adj.y
|
||||
rect[2] = (cell1.position.x - cell0.position.x) + cell1.size.x
|
||||
rect[3] = cell0.size.y
|
||||
|
||||
|
||||
func apply_theme():
|
||||
for node in nodes.values():
|
||||
if node is LineEdit and node.has_method('apply_colors'):
|
||||
node.apply_colors()
|
||||
|
||||
Reference in New Issue
Block a user