1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Fix layer button hierarchy lines being drawn in the wrong position

This commit is contained in:
Emmanouil Papadeas 2023-11-22 17:12:30 +02:00
parent d84c2dd6f3
commit d5c520643b

View file

@ -31,12 +31,14 @@ func _ready() -> void:
var hierarchy_depth := Global.current_project.layers[layer].get_hierarchy_depth()
hierarchy_spacer.custom_minimum_size.x = hierarchy_depth * HIERARCHY_DEPTH_PIXEL_SHIFT
if Global.control.theme.get_color("font_color", "Button").v > 0.5: # Light3D text is dark theme
if Global.control.theme.get_color("font_color", "Button").v > 0.5: # Light text is dark theme
self_modulate.v = 1 + hierarchy_depth * 0.4
else: # Dark text should be light theme
self_modulate.v = 1 - hierarchy_depth * 0.075
update_buttons()
await get_tree().process_frame
queue_redraw()
func update_buttons() -> void: