mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fix layer button hierarchy lines being drawn in the wrong position
This commit is contained in:
parent
d84c2dd6f3
commit
d5c520643b
|
@ -31,12 +31,14 @@ func _ready() -> void:
|
||||||
var hierarchy_depth := Global.current_project.layers[layer].get_hierarchy_depth()
|
var hierarchy_depth := Global.current_project.layers[layer].get_hierarchy_depth()
|
||||||
hierarchy_spacer.custom_minimum_size.x = hierarchy_depth * HIERARCHY_DEPTH_PIXEL_SHIFT
|
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
|
self_modulate.v = 1 + hierarchy_depth * 0.4
|
||||||
else: # Dark text should be light theme
|
else: # Dark text should be light theme
|
||||||
self_modulate.v = 1 - hierarchy_depth * 0.075
|
self_modulate.v = 1 - hierarchy_depth * 0.075
|
||||||
|
|
||||||
update_buttons()
|
update_buttons()
|
||||||
|
await get_tree().process_frame
|
||||||
|
queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
func update_buttons() -> void:
|
func update_buttons() -> void:
|
||||||
|
|
Loading…
Reference in a new issue