mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Set default clear color to be the same as the theme's PanelContainer bg_color
This commit is contained in:
parent
85d438a9c4
commit
0203a019c7
|
@ -316,40 +316,37 @@ func change_theme(ID : int) -> void:
|
|||
var ruler_style
|
||||
if ID == 0: # Dark Theme
|
||||
Global.theme_type = "Dark"
|
||||
VisualServer.set_default_clear_color(Color("2b2b2b"))
|
||||
main_theme = preload("res://assets/themes/dark/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/dark/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/dark/ruler_style.tres")
|
||||
elif ID == 1: # Gray Theme
|
||||
Global.theme_type = "Dark"
|
||||
VisualServer.set_default_clear_color(Color("3f3f3f"))
|
||||
main_theme = preload("res://assets/themes/gray/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/gray/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/dark/ruler_style.tres")
|
||||
elif ID == 2: # Godot's Theme
|
||||
Global.theme_type = "Blue"
|
||||
VisualServer.set_default_clear_color(Color("3b445c"))
|
||||
main_theme = preload("res://assets/themes/blue/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/blue/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/blue/ruler_style.tres")
|
||||
elif ID == 3: # Gold Theme
|
||||
Global.theme_type = "Gold"
|
||||
VisualServer.set_default_clear_color(Color(0.694118, 0.619608, 0.458824))
|
||||
main_theme = preload("res://assets/themes/gold/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/gold/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/gold/ruler_style.tres")
|
||||
elif ID == 4: # Light Theme
|
||||
Global.theme_type = "Light"
|
||||
VisualServer.set_default_clear_color(Color("e7e7e7"))
|
||||
main_theme = preload("res://assets/themes/light/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/light/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/light/ruler_style.tres")
|
||||
|
||||
Global.control.theme = main_theme
|
||||
Global.control.theme.default_font = font
|
||||
var default_clear_color : Color = main_theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
VisualServer.set_default_clear_color(Color(default_clear_color))
|
||||
(Global.animation_timeline.get_stylebox("panel", "Panel") as StyleBoxFlat).bg_color = main_theme.get_stylebox("panel", "Panel").bg_color
|
||||
var layer_button_panel_container : PanelContainer = Global.find_node_by_name(Global.animation_timeline, "LayerButtonPanelContainer")
|
||||
(layer_button_panel_container.get_stylebox("panel", "PanelContainer") as StyleBoxFlat).bg_color = main_theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
(layer_button_panel_container.get_stylebox("panel", "PanelContainer") as StyleBoxFlat).bg_color = default_clear_color
|
||||
|
||||
Global.top_menu_container.add_stylebox_override("panel", top_menu_style)
|
||||
Global.horizontal_ruler.add_stylebox_override("normal", ruler_style)
|
||||
|
|
Loading…
Reference in a new issue