archive_yaru.dart
archive_yaru.dart copied to clipboard
Density of list tiles and tables
https://github.com/canonical/ubuntu-desktop-installer/issues/546#issuecomment-983400339
- should we set the density globally ? I have some concerns with this
- we should end up with less big list tiles, tables and inputs, can be set individually even though it might not be as satisfying from the a dev perspective as using a global setting
The problem about setting it globally, even if the toolkit left a mechanism for this, is that the result might not be satisfying. First of all we could achieve the recreation of the mock-ups in the installer without it and changing it now might break widget sizes we didn't want to change. Then the buttons and all widgets really need to look everywhere the same, otherwise it is obviously totally inconsistent which would be a design nightmare.
Note: if we don't end up with different widget sizes I'm totally fine with this. We should decide on a setting that sets widget sizes one time and then is set everywhere.
@jpnurmi
Checkboxes and radios will also shrink then
The results might be totally random - what is the problem with setting visual densities for individual widgets? There are not so many widgets to set and I think it is manageable.
Also the current style is not so far away from mobile. Do not think about KDE or similar slim stuff when you think of the desktop, rather think GNOME or Windows11.
Maybe we can make it satisfying without changing the default global visual density. There are many things to debug and research but we can take it in tiny steps. :) I have no clue how to achieve all these things or if they're even doable without sending PRs Flutter, but here's a wishlist of items that come to my mind right now:
- buttons: use minimum size/height instead of hard-coded density
- remove widget-specific overridden densities if there are any others - leave that API for apps
- textfields/input decoration: reduce the default height to match buttons or make them dense?
- data table: reduce the header and data row heights
- list tile: the default height could be reduced here as well if possible? if not, maybe we'll just resort to dense list tiles even though it's supposed to be orthogonal to the non-dense tile's density (normal and dense list items can be mixed in the same app)
- menu/dropdown items are also quite large - is any way to tweak that?
remove widget-specific overridden densities if there are any others - leave that API for apps
So just for my information, we can leave density untouched but then still keep the current size of buttons in all apps that use yaru.dart by changing a different property of ButtonTheme ? I am thinking of the future where maybe more ubuntu desktop apps use yaru.dart
I am also thinking that we might need a better or a second example to see every standard material widget in one place to make a proper design decision on ... let's call it "sizes" for now, because I might be confusing what properties you want to flip Ideally examples for different scenarios of apps like a wizard, master details page a gallery or some sort of software suite. There is an open PR for a better example on yaru_widgets.dart which is ofc not the same as yaru.dart in this context. Yaru.dart should stay a theme for material widgets and should work for material widgets on all devices
FIxed inputs with #131
I think this is fixed