mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Transparency updates (#525)
* Update with theme instead of only value change instantly updates with theme (old version updated on value change only) * shortened some paths
This commit is contained in:
parent
48ed1cfd48
commit
ab18e8bdb6
|
@ -78,6 +78,10 @@ func change_theme(ID : int) -> void:
|
|||
Global.control.theme.default_font = font
|
||||
Global.default_clear_color = main_theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
VisualServer.set_default_clear_color(Color(Global.default_clear_color))
|
||||
if Global.control.get_node_or_null("AlternateTransparentBackground"): #also change color of AlternateTransparentBackground as well "if it exists"
|
||||
var new_color = Global.default_clear_color
|
||||
new_color.a = Global.control.get_node("AlternateTransparentBackground").color.a
|
||||
Global.control.get_node("AlternateTransparentBackground").color = new_color
|
||||
|
||||
(Global.animation_timeline.get_stylebox("panel", "Panel") as StyleBoxFlat).bg_color = main_theme.get_stylebox("panel", "Panel").bg_color
|
||||
var fake_vsplit_grabber : TextureRect = Global.animation_timeline.find_node("FakeVSplitContainerGrabber")
|
||||
|
|
|
@ -367,8 +367,8 @@ func window_transparency(value :float) -> void:
|
|||
get_node("../../AlternateTransparentBackground").visible = false
|
||||
else:
|
||||
get_node("../../AlternateTransparentBackground").visible = true
|
||||
var checker :ColorRect = get_parent().get_node("UI/ToolsAndCanvas/CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer/Viewport/TransparentChecker")
|
||||
var color :Color = Global.control.theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
var checker :ColorRect = Global.transparent_checker
|
||||
var color :Color = Global.default_clear_color
|
||||
color.a = value
|
||||
get_node("../../AlternateTransparentBackground").color = color
|
||||
checker.transparency(value)
|
||||
|
|
Loading…
Reference in a new issue