Closed jeremypw closed 3 years ago
@cassidyjames As this is in response to one of your PRs, I would welcome your comments.
Should resolutions with widths less than 1024px not be offered at all or put in a further submenu?
@jeremypw
[x] I think to start it would make sense to drop the aspect ratio from the main list (since they're all always going to match the native ratio).
[x] I’m leaning towards hiding too-low resolutions completely. It could make sense to drop any too-low resolutions in with the “Other…” resolutions as they are all non-ideal in one way or another. And then it make sense to list all aspect ratios in this submenu since they’re likely to differ.
[x] We should clarify how we determine a too-low resolution. It’s more than just the width, as often the height is more important to consider. Perhaps to start by considering a width < 1024 OR a height < 768 too low?
Now also fixes issue #252
@jeremypw I'm happy with the organization of the data now, I think I just want to think about the UI. A popover in a popover is a bit awkward, and I don't think we've used this sort of pattern with a label and then a dropdown button with a popover next to it. Might be worth getting a second opinion from @elementary/ux—or I could take a stab at iterating on the whole display configuration popover design. :grimacing:
@cassidyjames I admit I am not too happy with the way Gtk.Popover implements submenus but that is an upstream issue. I wanted something that was supported in Gtk4. If we move away from using a submenu then there are other possibilities e.g. having a "Show all" switch which repopulates the list.
Is there anywhere else in elementary system that has the current value displayed with a list of alternative shown with a click which doesn't use a combobox? In most cases the number of alternatives is small so a combobox is suitable. But you cannot put a submenu in a combobox afaik.
We may have to build a custom widget to put in popover rather than using its native menu facility. I'll work on it.
Another case where there are a large number of alternatives in a combobox is when choosing a locale - in that case the list is so long that it gets put in a scrolled window the height of the screen - which is not ideal.
Applying flat styleclass to the menubutton
Recommended resolutions without aspect ratio
After rejecting too small resolution, the "Other" list is more manageable
I've just realized that the combobox list does not have to be flat - it can have a tree structure. So it should be possible to hide the non-recommended resolutions in a "sub-folder" by preparing the underlying treemodel appropriately. I'll prepare an alternative PR on this basis.
Closing in favour of #302
Fixes #178 Fixes #252
The resolution combobox is replaced by a MenuButton/Popover built from a MenuModel. This allows less recommended resolutions to be put in a submenu. The main menu just shows resolutions with native aspect ratio and width >= 1024 px.
If this design is accepted, then the other two comboboxes can be replaced by a similar design for consistency either in this PR on in further PRs.