diff --git a/src/Main.gd b/src/Main.gd index 91ffd5c48e30..32660f105dcb 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -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) diff --git a/src/UI/TopMenuContainer.gd b/src/UI/TopMenuContainer.gd index 436fa275dd11..90d937fc80ad 100644 --- a/src/UI/TopMenuContainer.gd +++ b/src/UI/TopMenuContainer.gd @@ -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) diff --git a/src/UI/UI.tscn b/src/UI/UI.tscn index 59b217c048da..d47877c28fa6 100644 --- a/src/UI/UI.tscn +++ b/src/UI/UI.tscn @@ -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