headerbar: Use of flat style
There is a bunch of confusion and uncertainty around the question of how .flat
can be used with AdwHeaderBar.
The Past
Originally we wanted to stick to either one of these options
- No flat HeaderBar. The window can be dragged from the HeaderBar.
- Flat HeaderBar, no scrollable content, and the window can be dragged from everywhere.
The Present
Since the flat HeaderBars look pretty sleek, they are also used outside of this scope.
Examples
- Tour uses a flat HeaderBar in the main window and can't use GtkWindowHandle because inputs are required for the AdwCarousel.
- AdwAboutWindow uses a flat HeaderBar but has a manual solution for making the HeaderBar non-flat when scrolling the content.
Potential Problems
- It's not possible to infer from the design where the window can be dragged if the HeaderBar is flat. It might be the whole window or not.
- If only the flat HeaderBar is available for dragging, the area is not defined visually. (Testing with the devel style HeaderBar might be misleading in tests.)
- We don't have a defined scroll design that works with flat HeaderBars. (Even the AdwAboutWindow solution currently suffers from a missing GTK 4 feature.)
The Future
I'm not sure what the solution is, but IMO when should document how flat HeaderBars can and should be used.
If the design team wants to keep flat HeaderBars without windows that can be dragged from everywhere I would at least suggest testing if something like a hover effect for the HeaderBar would be visible to indicate the draggable area.
Also, we should standardize the HeaderBar design used in the AdwAboutWindow or drop it. IMO we should not sneak in designs for libadwaita windows that apps can't have in other windows consistently.