mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
992d17bc7f
# 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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |