Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ui_widgets/setting_frame.gd
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ func _ready() -> void:
if type != Type.NONE:
widget.reset_size()
reset_button.tooltip_text = Translator.translate("Reset to default")
reset_button.position = Vector2(size.x - 24, 4)
reset_button.set_anchors_and_offsets_preset(Control.PRESET_CENTER_RIGHT)
reset_button.pressed.connect(_on_reset_button_pressed)
update_widgets()

func _on_resized() -> void:
widget.position = Vector2(size.x - panel_width, 3)
reset_button.position = Vector2(size.x - 24, 4)
reset_button.set_anchors_and_offsets_preset(Control.PRESET_CENTER_RIGHT)
queue_redraw()

func _on_reset_button_pressed() -> void:
Expand Down
14 changes: 8 additions & 6 deletions src/ui_widgets/setting_frame.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
[node name="SettingFrame" type="Control"]
custom_minimum_size = Vector2(0, 28)
layout_mode = 3
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 24.0
grow_horizontal = 2
focus_mode = 1
mouse_filter = 1
script = ExtResource("1_p1ngn")

[node name="ResetButton" type="Button" parent="."]
layout_mode = 0
offset_left = 1000.0
offset_top = 3.0
offset_right = 1024.0
offset_bottom = 27.0
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -24.0
offset_bottom = 24.0
grow_horizontal = 0
size_flags_horizontal = 10
size_flags_vertical = 4
focus_mode = 0
Expand Down