mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-20 12:33:14 +00:00
Small improvements and bug fixes to the Display Scale option
When clicking Apply, the zoom level now gets fit to the frame, and the Preferences dialog keeps its focus and its tabs.
This commit is contained in:
parent
03d0525794
commit
28ca2cd87e
2 changed files with 9 additions and 7 deletions
|
@ -176,13 +176,15 @@ func _on_List_item_selected(index : int) -> void:
|
|||
child.visible = child.name == content_list[index]
|
||||
|
||||
|
||||
func _on_HSlider_value_changed(value):
|
||||
func _on_ShrinkHSlider_value_changed(value : float) -> void:
|
||||
shrink_label.text = str(value)
|
||||
|
||||
|
||||
func _on_ShrinkApplyButton_pressed():
|
||||
func _on_ShrinkApplyButton_pressed() -> void:
|
||||
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_DISABLED,
|
||||
SceneTree.STRETCH_ASPECT_IGNORE, Vector2(1014,576), Global.shrink)
|
||||
Global.preferences_dialog.popup_centered(Vector2(400, 280))
|
||||
Global.camera.zoom_100()
|
||||
|
||||
SceneTree.STRETCH_ASPECT_IGNORE, Vector2(1024,576), Global.shrink)
|
||||
hide()
|
||||
popup_centered(Vector2(400, 280))
|
||||
Global.dialog_open(true)
|
||||
yield(Global.get_tree().create_timer(0.01), "timeout")
|
||||
Global.camera.fit_to_frame(Global.current_project.size)
|
||||
|
|
|
@ -995,7 +995,7 @@ __meta__ = {
|
|||
[connection signal="about_to_show" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
||||
[connection signal="popup_hide" from="." to="." method="_on_PreferencesDialog_popup_hide"]
|
||||
[connection signal="item_selected" from="HSplitContainer/List" to="." method="_on_List_item_selected"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer/ShrinkHSlider" to="." method="_on_HSlider_value_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer/ShrinkHSlider" to="." method="_on_ShrinkHSlider_value_changed"]
|
||||
[connection signal="pressed" from="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer/ShrinkApplyButton" to="." method="_on_ShrinkApplyButton_pressed"]
|
||||
[connection signal="item_selected" from="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/HBoxContainer/PresetOptionButton" to="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts" method="_on_PresetOptionButton_item_selected"]
|
||||
[connection signal="confirmed" from="Popups/ShortcutSelector" to="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts" method="_on_ShortcutSelector_confirmed"]
|
||||
|
|
Loading…
Add table
Reference in a new issue