Skip to content

Commit

Permalink
Fix theme color preview spacing in the Preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Feb 11, 2024
1 parent 85b2550 commit 5c58562
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Preferences/HandleThemes.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var theme_button_group := ButtonGroup.new()
]

@onready var buttons_container: BoxContainer = $ThemeButtons
@onready var colors_container: BoxContainer = $ThemeColorsSpacer/ThemeColors
@onready var colors_container: BoxContainer = $ThemeColors
@onready var theme_color_preview_scene := preload("res://src/Preferences/ThemeColorPreview.tscn")


Expand Down Expand Up @@ -62,8 +62,8 @@ func add_theme(theme: Theme) -> void:

func remove_theme(theme: Theme) -> void:
var index := themes.find(theme)
var theme_button = buttons_container.get_child(index)
var color_previews = colors_container.get_child(index)
var theme_button := buttons_container.get_child(index)
var color_previews := colors_container.get_child(index)
buttons_container.remove_child(theme_button)
theme_button.queue_free()
colors_container.remove_child(color_previews)
Expand Down
10 changes: 2 additions & 8 deletions src/Preferences/PreferencesDialog.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,10 @@ script = ExtResource("5")
layout_mode = 2
size_flags_horizontal = 3

[node name="ThemeColorsSpacer" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/Themes"]
[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/Themes"]
layout_mode = 2
size_flags_horizontal = 3

[node name="Control" type="Control" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/Themes/ThemeColorsSpacer"]
layout_mode = 2

[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/Themes/ThemeColorsSpacer"]
layout_mode = 2
theme_override_constants/separation = 12
theme_override_constants/separation = 16

[node name="ButtonHeader" type="HBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface"]
layout_mode = 2
Expand Down

0 comments on commit 5c58562

Please sign in to comment.