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
Introduce YaruWindowTitleBar & YaruDialogTitleBar #455
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
For the window titlebar I would recommend
I would leave the dialogbar as it is Thank you very much for making this happen! |
Awesome 😍 |
Thank you! Looks very nice!
Is it enough to have different colors for active and inactive states or does it need some sort of backdrop effect? |
Do we really always need a background for dialog titlebars? I think even the gnomers are stepping away from this. Maybe we could have an option to remove both border and background color without too many hacks? |
Maybe can we do like Libadwaita, by remove titlebar background and tone down everything inside? |
We can make the colors etc. themable so one can change the values in one place |
In fact I like both solutions 🙂 |
How's this? All of our theme classes can be used as Flutter theme extensions: YaruTheme(
extensions: [
YaruTitleBarThemeData(
backgroundColor: MaterialStateProperty.all(Colors.transparent),
),
YaruFooBarThemeData(
...
),
]
builder: (context, yaru, child) => MaterialApp(
theme: yaru.theme,
darkTheme: yaru.darkTheme,
home: ...
),
) |
Any ideas on how to deal with different platforms? Leave it up to the user to only create a |
Very nice |
Depends on you 🙂 |
This PR makes it possible to call I used the same WindowManager API when testing Windows and macOS earlier. This could be a nice and cross-platform way to set things up. |
That's pretty awesome! |
Wow! This looks absolutely gorgeous! |
Looks awesome! One potential problem I could see though is the expected behaviour when dialogs are opened. I don't know where the intention lies, which is why I'm saying “potential” but not being able to access the titlebar or it's functions while dialogs are open could be unexpected by some users. |
Thanks. The way it currently behaves is that dialog title bars allow moving the entire window and opening the popup menu. This makes dialogs feel almost like top-level windows. :) |
Yes, and this is a really good idea, because as the headerbar is now a flutter widget, it is hidden when you open a dialog. |
Changes extracted from #455, leaving out YaruWindow/DialogTitleBar etc.
I have to eat my words. It's not possible to hide the native title/header bar from Dart early enough. It's visible for a brief moment during startup. |
does this mean that the version where you do not touch my_application.cc shows the bar for a short moment or is it even shown when you make the known changes from handy_window? |
@Jupi007 What about |
@jpnurmi I had already tried My flutter version is:
Looks like I'm using the latest stable version. |
Forcing opacity for the whole titlebar makes it hard to set a custom background color.
Wonder why it worked for me 🤔 |
Will try this once back home 👍 |
Nope, I re-cloned the project, and the exception is still present... |
then the only difference that comes to my mind that is left is maybe the locale? try running flutter run with en_US LANGUAGE=en_US flutter run |
Found the problem: it is broken in debug mode. I can perfectly run the example app in both mode from |
Gotcha, so isMovable().catchError((_) => true), doesn't actually end up catching the error because |
@Jupi007 Ok, should be fixed now. Please give it a try when you have time. 🙏 |
Works 🥳 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGFM 🚀
Yes 🖐️👍 I'll do a release tomorrow if you aren't faster 😉 thank you JP |
YaruWindowTitleBar
andYaruDialogTitleBar
are based onYaruTitleBar
but provide slightly different behavior. The dialog variant has no minimize and maximize buttons by default, doesn't react to double clicks, and callsNavigator.maybePop
when closed.