-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to toggle window control buttons #9083
Add option to toggle window control buttons #9083
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
I tested the change on Windows 11 and macOS Ventura, both OSes disable the buttons correctly. However, on macOS there is still an issue where you can double click the top bar of the window to maximize it even though the button is disabled. I'm looking into whether this can be disabled. On Windows, if the maximize button is disabled and the window is not maximized double clicking the window top bar won't do anything. However, if the window is already maximized, double clicking the top bar will un-maximize it. I will accept this behavior. 😃 Edit: The double-click-bar-to-maximize behavior on macOS is controlled by the |
I just tested on Linux Mint Mate (derived from Gnome, X11), and the But setting My "double click on the bar" is configured to do a kind of weird semi-minimize where only the title bar of the window remains, that is also still possible, I could try to change this behaviour to maximize but my guess is it would do the same (not maximize if |
Yes, in essence this PR just exposes the Maybe I can add a note about this discrepancy in the docstrings as well? Edit: This might be the reason why on X11 the maximize button deactivates when In general, this feature (among others) is straight up not implemented for X11 and Wayland which |
I think it's fine if it's not supported on every platform, we just need to be transparent about it. Edit: beside the remarks on documentation, looks good to me! |
For posterity, I was confused as to why, in older bevy/winit versions, when setting |
It looks like your PR is a breaking change, but you didn't provide a migration guide. Could you add some context on what users should update when this change get released in a new version of Bevy? |
Can you put a simple migration guide to say that a new field is added to |
Damn, I'm so used to using ..default() that I overlooked that this can actually be a breaking change! Will add it now! Edit: added it now, @Selene-Amanita does it conform with other PRs? |
Perfect thanks! |
Objective
Implements #9082 but with an option to toggle minimize and close buttons too.
Solution
enabled_buttons
member to theWindow
struct through which users can enable or disable specific window control buttons.Changelog
enabled_buttons
member to theWindow
struct through which users can enable or disable specific window control buttons.window_settings
example which demonstrates the toggling functionality.Migration guide
enabled_buttons
member to theWindow
struct through which users can enable or disable specific window control buttons.