ubuntu / yaru.dart

Ubuntu Yaru Flutter widgets and themes for building desktop and web applications
https://ubuntu.github.io/yaru.dart/
Mozilla Public License 2.0
197 stars 35 forks source link

Window title bar: follow system settings #532

Open jpnurmi opened 1 year ago

jpnurmi commented 1 year ago

titlebar actions (lower, menu, minimize, none, toggle maximize, toggle maximize horizontally, toggle maximize vertically, toggle shade)

titlebar buttons

see also

Feichtmeier commented 1 year ago

Eventually we might need to increase the width of the very small compact sidebar by some pixels for this then

jpnurmi commented 1 year ago

Some issues highlighted by Tweaks.

With separated title bars, there's often no room in the leading area. Tweaks has to increase the width of the master pane...

Screencast from 2023-01-16 09-21-26.webm

In portrait mode, the button arrangement gets a bit cumbersome. Notice also a rendering issue in the rounded top window corners. Master Detail
image image
12people commented 1 year ago

Just submitted #762 , which would allow specifying a custom window control layout.

This way, a developer can choose to respect the platform's current window control layout — by using the YaruWindowControlLayout.parseGTKSetting(settingString) in combination with the gtk package, which can retrieve this GTK setting string.

There are several potentially controversial design choices I made that warrant additional discussion:

What do you think about these points?

Let me know what the best way forward is.

Feichtmeier commented 1 year ago

Hi @12people Thank you very much :+1: Generally not pulling more deps in is very wise. I can not say much about the rest as what you say sounds plausible though needs maybe a bit more testing. Or is this something that could be instead made in YaruWindow? (a dep of yaru widgets)

Even though this could take time or will happen never, I would prefer to see an opinion of @jpnurmi on this one.

Feichtmeier commented 1 year ago

@12people we def. want this in, thank you very much for your work. But since I did not write those parts but JP (which sadly left) we need to be sure that it works. I hope I will find soon time to properly review this

12people commented 1 year ago

No problem.

I should just mention that before this is merged, the issues brought up above need to be resolved and also tests need to be adjusted (at least goldens — there will be new ones needed).

12people commented 6 months ago

@Feichtmeier What state is this in? The last comment here mentions that the PR needs to be reviewed — has that happened? What are the next steps?

Feichtmeier commented 6 months ago

@Feichtmeier What state is this in? The last comment here mentions that the PR needs to be reviewed — has that happened? What are the next steps?

This is the current status It has conflicts now, as I can see you changed the flutter and the part that watches the gtk settings is still needed,right?

12people commented 6 months ago

@Feichtmeier The part that loads gtk settings can be left up to the gtk package, as mentioned above. My code doesn't include this library in order to not add an extra dependency, but, if you decide, it can be included.

12people commented 6 months ago

So the pull request is still waiting for review, if I understand correctly?

Feichtmeier commented 6 months ago

So the pull request is still waiting for review, if I understand correctly?

This repo here now depends on gtk anyways because YaruTheme also watches for a gtk setting (the gnome theme) So including this into your PR would be a good idea https://github.com/ubuntu/yaru.dart/blob/main/pubspec.yaml#L17 After you added it I will review it

sergio-costas commented 6 months ago

@Feichtmeier You assigned this to me, but I don't have enough dart knowledge for this...

Feichtmeier commented 6 months ago

Okay sorry, I thought because you created the PR? :) Anyways, sorry then.

sergio-costas commented 6 months ago

Oh, ok... yeah, now I see it. I tried, but certainly it is quite out of my current capabilities :-D

Feichtmeier commented 5 months ago

We need to ensure that this works with multiple headerbar scenarios