Merge remote-tracking branch 'lepshiy/master'

This commit is contained in:
sasha80
2026-01-26 15:31:22 +03:00
11 changed files with 32 additions and 38 deletions

View File

@@ -97,11 +97,11 @@ func on_checkbutton_pressed(i_row: int):
## Вызывается, когда узел впервые попадает в дерево сцены.
func _ready() -> void:
setting_tab()
if not OS.get_cmdline_args().has('++ограниченный'):
return
$Label2.text = 'Текущий режим доступа: ограниченный'
for node in $GridContainer.get_children().filter(func(b): return b is Button):
node.disabled = true
if OS.get_cmdline_args().has('++ограниченный'):
$Label2.text = 'Текущий режим доступа: ограниченный'
for node in $GridContainer.get_children().filter(func(b): return b is Button):
node.disabled = true
ProjectSettings.emit_signal('settings_changed')
func on_external_cu_btn_pressed(btn) -> void:
@@ -289,6 +289,7 @@ func on_theme_toggle_pressed(btn: CheckButton) -> void:
ProjectSettings.set_setting('application/config/Цвет темы программы', is_light)
_autosave_now()
func _update_theme_colors():
var color_white = $scroll_set/table.get_node2(1, COLOR_WHITE)
var color_black = $scroll_set/table.get_node2(1, COLOR_BLACK)

View File

@@ -1,19 +0,0 @@
extends LineEdit
func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', apply_colors)
func apply_colors():
var is_light: bool = ProjectSettings.get_setting('application/config/Цвет темы программы', false)
var style = get_theme_stylebox('read_only').duplicate()
if is_light:
style.bg_color = Color.GRAY
add_theme_color_override('font_color_readonly', Color.BLACK)
add_theme_color_override('font_color_placeholder', Color(0, 0, 0, 0.5))
else:
style.bg_color = Color(0.12, 0.12, 0.12)
add_theme_color_override('font_color_readonly', Color('#D8731A')) # тёмно-оранжевый
add_theme_color_override('font_color_placeholder', Color(1, 1, 1, 0.5))
add_theme_stylebox_override('read_only', style)

View File

@@ -1 +0,0 @@
uid://bky7xlpaj21sj

View File

@@ -1,10 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://bvbvtgwps54yr"]
[ext_resource type="Script" uid="uid://bky7xlpaj21sj" path="res://table/editl.gd" id="1_xd53c"]
[node name="Editl" type="LineEdit"]
offset_right = 59.875
offset_bottom = 33.0
caret_blink = true
caret_blink_interval = 0.5
script = ExtResource("1_xd53c")

View File

@@ -5,6 +5,10 @@ func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', apply_colors)
func _exit_tree() -> void:
ProjectSettings.disconnect('settings_changed', apply_colors)
func apply_colors():
var is_light: bool = ProjectSettings.get_setting('application/config/Цвет темы программы', false)
var style = get_theme_stylebox('normal').duplicate()

View File

@@ -5,6 +5,10 @@ func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', apply_colors)
func _exit_tree() -> void:
ProjectSettings.disconnect('settings_changed', apply_colors)
func apply_colors():
var is_light: bool = ProjectSettings.get_setting('application/config/Цвет темы программы', false)
var style = get_theme_stylebox('read_only').duplicate()

View File

@@ -7,6 +7,10 @@ func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', on_setting_changed)
func _exit_tree() -> void:
ProjectSettings.disconnect('settings_changed', on_setting_changed)
func on_setting_changed():
var cb = $CheckButton
checkbutton_material = cb.material

View File

@@ -7,6 +7,10 @@ func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', on_setting_changed)
func _exit_tree() -> void:
ProjectSettings.disconnect('settings_changed', apply_colors)
func on_setting_changed():
var cb = $CheckButton
checkbutton_material = cb.material

View File

@@ -392,6 +392,8 @@ func add_row(row_types: Array) -> void:
_assert(node.get('name') is StringName, 'экземпляр не имеет поля \"name\"')
var node_key: String = NODE_KEY_FORMAT % [i_row, i_col]
node.name = node_key
if node.has_method('apply_colors'):
node.apply_colors()
add_child(node)
if allow_set_size:
node.custom_minimum_size.x = columns_min_size[i_col]

View File

@@ -1,8 +1,9 @@
extends LineEdit
func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', apply_colors)
# Вызывается
func _enter_tree() -> void: ProjectSettings.connect('settings_changed', apply_colors)
func _exit_tree() -> void: ProjectSettings.disconnect('settings_changed', apply_colors)
func _ready() -> void: print_debug()
func apply_colors():

View File

@@ -3,6 +3,10 @@ extends ColorPickerButton
func _enter_tree() -> void:
ProjectSettings.connect('settings_changed', apply_colors)
func _exit_tree() -> void:
ProjectSettings.disconnect('settings_changed', apply_colors)
func apply_colors():