mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Tall wide screen corrections (#478)
* a minor visibility change. made the nodes that were not needed in wide-screen "Invicible" the visibility will now be controlled procedurally * Added some lines of code in "change_ui_layout()" The added lines will control node visibility changes to adjust to current screen mode * added a line to fix tall-screen "zen-mode"
This commit is contained in:
parent
70d5fad9fd
commit
729c3ae1af
|
@ -81,6 +81,9 @@ func change_ui_layout(mode : String) -> void:
|
|||
|
||||
if mode == "tallscreen" and not tallscreen_is_active:
|
||||
tallscreen_is_active = true
|
||||
# changing visibility and re-parenting of nodes for tall screen
|
||||
ui.get_node("CanvasAndTimeline/HBoxContainer").visible = true
|
||||
reparent_node_to(Global.animation_timeline, ui.get_node("CanvasAndTimeline/HBoxContainer/BottomPanel"), 0)
|
||||
reparent_node_to(right_panel, bottom_panel, 0)
|
||||
right_panel.rect_min_size.y = 300
|
||||
reparent_node_to(canvas_preview_container, tool_and_palette_vsplit, 1)
|
||||
|
@ -89,6 +92,9 @@ func change_ui_layout(mode : String) -> void:
|
|||
reparent_node_to(tool_panel, ui.get_node("CanvasAndTimeline/HBoxContainer"), 0)
|
||||
elif mode == "widescreen" and tallscreen_is_active:
|
||||
tallscreen_is_active = false
|
||||
# Reparenting and hiding nodes to adjust wide-screen
|
||||
reparent_node_to(Global.animation_timeline, ui.get_node("CanvasAndTimeline"), 1)
|
||||
ui.get_node("CanvasAndTimeline/HBoxContainer").visible = false
|
||||
reparent_node_to(right_panel, ui, -1)
|
||||
right_panel.rect_min_size.y = 0
|
||||
reparent_node_to(canvas_preview_container, right_panel.get_node("PreviewAndPalettes"), 0)
|
||||
|
|
|
@ -424,6 +424,7 @@ func toggle_zen_mode() -> void:
|
|||
Global.tool_panel.visible = zen_mode
|
||||
Global.right_panel.visible = zen_mode
|
||||
Global.tabs_container.visible = zen_mode
|
||||
Global.control.get_node("MenuAndUI/UI/CanvasAndTimeline/HBoxContainer").visible = zen_mode
|
||||
zen_mode = !zen_mode
|
||||
view_menu.set_item_checked(ViewMenuId.ZEN_MODE, zen_mode)
|
||||
|
||||
|
|
|
@ -432,6 +432,7 @@ margin_right = 950.0
|
|||
margin_bottom = 692.0
|
||||
size_flags_horizontal = 3
|
||||
custom_constants/autohide = 0
|
||||
split_offset = 278
|
||||
|
||||
[node name="ViewportAndRulers" type="VBoxContainer" parent="CanvasAndTimeline"]
|
||||
margin_right = 902.0
|
||||
|
@ -539,7 +540,14 @@ current = true
|
|||
zoom = Vector2( 0.15, 0.15 )
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="AnimationTimeline" parent="CanvasAndTimeline" instance=ExtResource( 18 )]
|
||||
margin_top = 492.0
|
||||
margin_bottom = 692.0
|
||||
size_flags_vertical = 3
|
||||
custom_styles/panel = SubResource( 3 )
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasAndTimeline"]
|
||||
visible = false
|
||||
margin_top = 492.0
|
||||
margin_right = 902.0
|
||||
margin_bottom = 692.0
|
||||
|
@ -552,12 +560,6 @@ size_flags_horizontal = 3
|
|||
size_flags_vertical = 3
|
||||
custom_constants/autohide = 0
|
||||
|
||||
[node name="AnimationTimeline" parent="CanvasAndTimeline/HBoxContainer/BottomPanel" instance=ExtResource( 18 )]
|
||||
margin_top = 0.0
|
||||
margin_bottom = 200.0
|
||||
size_flags_vertical = 3
|
||||
custom_styles/panel = SubResource( 3 )
|
||||
|
||||
[node name="RightPanel" type="Panel" parent="."]
|
||||
margin_left = 950.0
|
||||
margin_right = 1280.0
|
||||
|
|
Loading…
Reference in a new issue