Merge remote-tracking branch 'lepshiy/master'
# Conflicts: # scenes/работа/работа.gd
This commit is contained in:
@@ -92,9 +92,14 @@ func _enter_tree() -> void:
|
|||||||
$back.scale = size
|
$back.scale = size
|
||||||
$back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0))
|
$back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0))
|
||||||
$button.connect('toggled', _on_button_toggled)
|
$button.connect('toggled', _on_button_toggled)
|
||||||
|
ProjectSettings.connect("settings_changed", _on_settings_changed)
|
||||||
pressed = _pressed
|
pressed = _pressed
|
||||||
|
|
||||||
|
|
||||||
|
func _on_settings_changed():
|
||||||
|
apply_colors(ProjectSettings.get_setting("application/config/Цвет темы программы", false ))
|
||||||
|
|
||||||
|
|
||||||
func _exit_tree() -> void:
|
func _exit_tree() -> void:
|
||||||
$button.disconnect('toggled', _on_button_toggled)
|
$button.disconnect('toggled', _on_button_toggled)
|
||||||
|
|
||||||
@@ -106,3 +111,19 @@ func set_toggle_mode(val: bool):
|
|||||||
func _on_button_toggled(val: bool):
|
func _on_button_toggled(val: bool):
|
||||||
if val: $state.set_texture(texture_state1)
|
if val: $state.set_texture(texture_state1)
|
||||||
else: $state.set_texture(texture_state0)
|
else: $state.set_texture(texture_state0)
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors(is_light: bool):
|
||||||
|
pass
|
||||||
|
#if is_light:
|
||||||
|
#$button.add_theme_color_override("font_color", Color.WHITE)
|
||||||
|
#$button.add_theme_color_override("font_hover_color", Color.WHITE)
|
||||||
|
#$button.add_theme_color_override("font_pressed_color", Color.WHITE)
|
||||||
|
#$button.add_theme_color_override("font_focus_color", Color.BLACK)
|
||||||
|
#$button.add_theme_color_override("font_disabled_color", Color.WHITE)
|
||||||
|
#$button.add_theme_color_override("font_shadow_color", Color.LIGHT_GOLDENROD)
|
||||||
|
#else:
|
||||||
|
#$button.remove_theme_color_override("font_color")
|
||||||
|
#$button.remove_theme_color_override("font_hover_color")
|
||||||
|
#$button.remove_theme_color_override("font_pressed_color")
|
||||||
|
#$button.remove_theme_color_override("font_disabled_color")
|
||||||
|
|||||||
@@ -318,7 +318,6 @@ func on_color_closed(color_btn_act: ColorPickerButton):
|
|||||||
|
|
||||||
|
|
||||||
func _autosave_now() -> void:
|
func _autosave_now() -> void:
|
||||||
print("AUTOSAVE")
|
|
||||||
var json_data = {}
|
var json_data = {}
|
||||||
for i in SETTING_TABLE.size():
|
for i in SETTING_TABLE.size():
|
||||||
var parameter = SETTING_TABLE[i][0]
|
var parameter = SETTING_TABLE[i][0]
|
||||||
|
|||||||
@@ -154,12 +154,6 @@ func on_settings_changed():
|
|||||||
color_emit_sel *= Color(1.0, 1.0, 1.0, 0.2)
|
color_emit_sel *= Color(1.0, 1.0, 1.0, 0.2)
|
||||||
color_closed *= Color(1.0, 1.0, 1.0, 0.0)
|
color_closed *= Color(1.0, 1.0, 1.0, 0.0)
|
||||||
color_closed_emit *= Color(1.0, 1.0, 1.0, 1.0)
|
color_closed_emit *= Color(1.0, 1.0, 1.0, 1.0)
|
||||||
apply_colors()
|
|
||||||
|
|
||||||
|
|
||||||
func apply_colors():
|
|
||||||
var is_light: bool = ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false)
|
|
||||||
var style = StyleBoxFlat.new()
|
|
||||||
|
|
||||||
|
|
||||||
## Обработчик сигнала изменения списка целей.
|
## Обработчик сигнала изменения списка целей.
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
extends LineEdit
|
extends LineEdit
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _update_background() -> void:
|
func _enter_tree() -> void:
|
||||||
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("read_only").duplicate()
|
var style = get_theme_stylebox("read_only").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
extends Label
|
extends Label
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _enter_tree() -> void:
|
||||||
_update_background()
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
|
||||||
func _update_background() -> void:
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("normal").duplicate()
|
var style = get_theme_stylebox("normal").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
extends LineEdit
|
extends LineEdit
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _enter_tree() -> void:
|
||||||
_update_background()
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
|
||||||
func _update_background() -> void:
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("read_only").duplicate()
|
var style = get_theme_stylebox("read_only").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
style.bg_color = Color.GRAY
|
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:
|
else:
|
||||||
style.bg_color = Color(0.12, 0.12, 0.12)
|
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)
|
add_theme_stylebox_override("read_only", style)
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
extends LineEdit
|
extends LineEdit
|
||||||
|
|
||||||
func _ready():
|
var checkbutton_material: Material
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
_update_background()
|
func _enter_tree() -> void:
|
||||||
|
ProjectSettings.connect('settings_changed', on_setting_changed)
|
||||||
func _update_background() -> void:
|
|
||||||
|
|
||||||
|
func on_setting_changed():
|
||||||
|
var cb = $CheckButton
|
||||||
|
checkbutton_material = cb.material
|
||||||
|
apply_colors()
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("read_only").duplicate()
|
var style = get_theme_stylebox("read_only").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
@@ -14,3 +21,8 @@ func _update_background() -> void:
|
|||||||
else:
|
else:
|
||||||
style.bg_color = Color(0.12, 0.12, 0.12)
|
style.bg_color = Color(0.12, 0.12, 0.12)
|
||||||
add_theme_stylebox_override("read_only", style)
|
add_theme_stylebox_override("read_only", style)
|
||||||
|
var cb = $CheckButton
|
||||||
|
if is_light:
|
||||||
|
cb.material = null
|
||||||
|
else:
|
||||||
|
cb.material = checkbutton_material
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://dgidt8lifm7xe"]
|
[gd_scene load_steps=8 format=3 uid="uid://dgidt8lifm7xe"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://btvrqnnjjum20" path="res://table/set-toggle.gd" id="1_kvru5"]
|
[ext_resource type="Script" uid="uid://btvrqnnjjum20" path="res://table/set-toggle.gd" id="1_kvru5"]
|
||||||
|
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="2_wrw87"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f4oye"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f4oye"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wrw87"]
|
||||||
|
shader = ExtResource("2_wrw87")
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_t3fqw"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_t3fqw"]
|
||||||
|
|
||||||
[sub_resource type="Theme" id="Theme_odxqp"]
|
[sub_resource type="Theme" id="Theme_odxqp"]
|
||||||
@@ -19,6 +23,7 @@ editable = false
|
|||||||
script = ExtResource("1_kvru5")
|
script = ExtResource("1_kvru5")
|
||||||
|
|
||||||
[node name="CheckButton" type="CheckButton" parent="."]
|
[node name="CheckButton" type="CheckButton" parent="."]
|
||||||
|
material = SubResource("ShaderMaterial_wrw87")
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 21.0
|
offset_left = 21.0
|
||||||
offset_top = 1.0
|
offset_top = 1.0
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
extends LineEdit
|
extends LineEdit
|
||||||
|
|
||||||
func _ready():
|
var checkbutton_material: Material
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
_update_background()
|
func _enter_tree() -> void:
|
||||||
|
ProjectSettings.connect('settings_changed', on_setting_changed)
|
||||||
func _update_background() -> void:
|
|
||||||
|
|
||||||
|
func on_setting_changed():
|
||||||
|
var cb = $CheckButton
|
||||||
|
checkbutton_material = cb.material
|
||||||
|
apply_colors()
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("read_only").duplicate()
|
var style = get_theme_stylebox("read_only").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
@@ -14,3 +21,8 @@ func _update_background() -> void:
|
|||||||
else:
|
else:
|
||||||
style.bg_color = Color(0.12, 0.12, 0.12)
|
style.bg_color = Color(0.12, 0.12, 0.12)
|
||||||
add_theme_stylebox_override("read_only", style)
|
add_theme_stylebox_override("read_only", style)
|
||||||
|
var cb = $CheckButton
|
||||||
|
if is_light:
|
||||||
|
cb.material = null
|
||||||
|
else:
|
||||||
|
cb.material = checkbutton_material
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_il5wc"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_il5wc"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xxfw6"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8lkgc"]
|
||||||
shader = ExtResource("1_anyuq")
|
shader = ExtResource("1_anyuq")
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8lkgc"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8lkgc"]
|
||||||
@@ -25,7 +25,7 @@ deselect_on_focus_loss_enabled = false
|
|||||||
script = ExtResource("1_8lkgc")
|
script = ExtResource("1_8lkgc")
|
||||||
|
|
||||||
[node name="CheckButton" type="CheckButton" parent="."]
|
[node name="CheckButton" type="CheckButton" parent="."]
|
||||||
material = SubResource("ShaderMaterial_xxfw6")
|
material = SubResource("ShaderMaterial_8lkgc")
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 453.0
|
offset_left = 453.0
|
||||||
offset_top = 1.5
|
offset_top = 1.5
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
extends LineEdit
|
extends LineEdit
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _enter_tree() -> void:
|
||||||
_update_background()
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
|
||||||
func _update_background() -> void:
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("normal").duplicate()
|
var style = get_theme_stylebox("normal").duplicate()
|
||||||
var style_1 = get_theme_stylebox("read_only").duplicate()
|
var style_1 = get_theme_stylebox("read_only").duplicate()
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
extends ColorPickerButton
|
extends ColorPickerButton
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_update_background()
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _enter_tree() -> void:
|
||||||
_update_background()
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
|
||||||
func _update_background() -> void:
|
|
||||||
|
func apply_colors():
|
||||||
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
var is_light: bool = ProjectSettings.get_setting("application/config/Цвет темы программы", false)
|
||||||
var style = get_theme_stylebox("normal").duplicate()
|
var style = get_theme_stylebox("normal").duplicate()
|
||||||
if is_light:
|
if is_light:
|
||||||
|
|||||||
Reference in New Issue
Block a user