mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
# Objective MacOS has some nice options for controlling the window and titlebar to make the content appear much more "immersively" in the window. This PR exposes options for controlling this. ## Solution Adds new fields to `Window` to control these, with doc comments to explain what they do and that they're MacOS only. ## Testing Tested on a MacOS machine (not my own, I don't have one). That's where the below screenshots were taken. --- ## Showcase On MacOS, you now have more options for configuring the window titlebar. You can, for example, make the title bar transparent and only show the window controls. This provides a more "immersive" experience for your rendered content. Before, only this was possible: <img width="1392" alt="image" src="https://github.com/user-attachments/assets/abf03da2-d247-4202-a7e7-731c45d80d54"> Now, you can create windows like this: <img width="1392" alt="image2" src="https://github.com/user-attachments/assets/3239d0e3-4708-4798-8755-188541e14f93"> This uses the following `bevy_window::Window` settings: ```rs fullsize_content_view: true, titlebar_transparent: true, titlebar_show_title: false, ``` ## Migration Guide `bevy_window::Window` now has extra fields for configuring MacOS window settings: ```rs pub movable_by_window_background: bool, pub fullsize_content_view: bool, pub has_shadow: bool, pub titlebar_shown: bool, pub titlebar_transparent: bool, pub titlebar_show_title: bool, pub titlebar_show_buttons: bool, ``` Using `Window::default` keeps the same behaviour as before. |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_ecs | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_image | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_mesh | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_picking | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_remote | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_state | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |