-
-
Notifications
You must be signed in to change notification settings - Fork 36
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 Minimize, Maximize, MaximizeOrRestore functions support #60
Comments
This can be done by GTK on linux, UWP on windows and AppKit on macos. |
Can you be more specific? By default (when not customizing title bar) GTK is using CSD on gnome and SSD on KDE. What better support exactly do you have in mind? |
Ultimately I want to achieve this using nativeshell: |
If you set window frame to WindowFrame.noTitle, it should still have shadow and possibly rounded corners. |
Ok I will try it, also can we mimic current theming headerbar for platforms like gtk to lookmmore native, It is possible in GTK but I don't know much about it. |
You can make custom title bar (or any draggable section) by calling |
@knopp And please if possible make max, min, close icon native to the current Operating system and theming. |
That is not really possible, nor goal of flutter / nativeshell. If you want to do that, then you can just write native code and customize the GtkHeaderBar of the window. If you're making a custom window you're in charge of anything you put in there. |
This comment has been minimized.
This comment has been minimized.
@knopp Is there any way to get response from window manager to check if titlebar buttons are to be shown or not? Use case: But because this was custom implementation inside flutter code so titlebar buttons will still be visible. I want to get a callback from shell something like This can also be used for windows phone and apps, I don't know about mac as it only have a desktop ui so this method will always return true on that. For ios / android this method will return false as titlebar is not needed there. |
You can not use nativeshell with iOS / Android. It is desktop only at this point. |
@knopp Yeah, I only gave an example if the callback is added to this plugin. |
Something like this should work: final flags = await window.getWindowStateFlags();
await window.setMaximized(!flags.maximized); |
@knopp Can this be a method so that it would be easy and I will not have to repeat the code, Thanks. |
You can easily make it an extension method. |
Thanks, I will close this then. |
As CSD support is complete by setting frame to WindowFrame.noTitle, the only thing missing is the titlebar button functions support.
The text was updated successfully, but these errors were encountered: