mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:34:43 -04:00
Theme edits (#342)
* Theme edits Changed all the themes to be more consistent, buttons and panel containers have rounded edges. Note that the spacings have been switched too, so it needs subtle remakes in the placing of each element. Especially the tool buttons. Also check the themes on preferences (need better spacing) and rulers are not included. * Some UI fixes * Reduced size of themes * Fixed more spacing issues and replaced timeline grabber icon * Removed old theme icons * Change purple and light rulers * Fix purple top menu & caramel rulers Co-authored-by: Erevoid <Erevoid@users.noreply.github.com> Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
This commit is contained in:
parent
da24133a4d
commit
41a9107c45
39 changed files with 13449 additions and 12179 deletions
|
@ -7,9 +7,10 @@ onready var themes := [
|
|||
[preload("res://assets/themes/blue/theme.tres"), "Blue"],
|
||||
[preload("res://assets/themes/caramel/theme.tres"), "Caramel"],
|
||||
[preload("res://assets/themes/light/theme.tres"), "Light"],
|
||||
[preload("res://assets/themes/purple/theme.tres"), "Purple"],
|
||||
]
|
||||
onready var buttons_container : BoxContainer = $ThemeButtons
|
||||
onready var colors_container : BoxContainer = $ThemeColors
|
||||
onready var colors_container : BoxContainer = $ThemeColorsSpacer/ThemeColors
|
||||
onready var theme_color_preview_scene = preload("res://src/Preferences/ThemeColorPreview.tscn")
|
||||
|
||||
|
||||
|
@ -59,12 +60,18 @@ func change_theme(ID : int) -> void:
|
|||
Global.theme_type = Global.Theme_Types.CARAMEL
|
||||
elif ID == 4: # Light Theme
|
||||
Global.theme_type = Global.Theme_Types.LIGHT
|
||||
elif ID == 5: # Purple Theme
|
||||
Global.theme_type = Global.Theme_Types.DARK
|
||||
|
||||
Global.control.theme = main_theme
|
||||
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))
|
||||
|
||||
(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.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
|
||||
fake_vsplit_grabber.texture = main_theme.get_icon("grabber", "VSplitContainer")
|
||||
|
||||
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 = Global.default_clear_color
|
||||
|
||||
|
@ -80,13 +87,6 @@ func change_theme(ID : int) -> void:
|
|||
Global.vertical_ruler.add_stylebox_override("hover", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
|
||||
|
||||
var fake_vsplit_grabber : TextureRect = Global.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
|
||||
|
||||
if Global.theme_type == Global.Theme_Types.DARK or Global.theme_type == Global.Theme_Types.BLUE:
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/dark/icons/vsplit.png")
|
||||
else:
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/light/icons/vsplit.png")
|
||||
|
||||
for button in get_tree().get_nodes_in_group("UIButtons"):
|
||||
if button is TextureButton:
|
||||
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
|
||||
|
|
|
@ -113,20 +113,23 @@ text = "System Language"
|
|||
|
||||
[node name="Themes" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
visible = false
|
||||
margin_top = 28.0
|
||||
margin_right = 498.0
|
||||
margin_bottom = 164.0
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="ThemeButtons" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_right = 80.0
|
||||
margin_bottom = 136.0
|
||||
|
||||
[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_left = 84.0
|
||||
margin_right = 134.0
|
||||
margin_bottom = 136.0
|
||||
custom_constants/separation = 6
|
||||
[node name="ThemeColorsSpacer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="Control" type="Control" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes/ThemeColorsSpacer"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes/ThemeColorsSpacer"]
|
||||
margin_left = 4.0
|
||||
margin_right = 4.0
|
||||
custom_constants/separation = 12
|
||||
|
||||
[node name="Canvas" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
visible = false
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[node name="ThemeColorPreview" type="ColorRect"]
|
||||
margin_right = 50.0
|
||||
margin_bottom = 14.0
|
||||
rect_min_size = Vector2( 50, 14 )
|
||||
rect_min_size = Vector2( 50, 16 )
|
||||
color = Color( 0.380392, 0.384314, 0.380392, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue