Image viewer control visibility
This is a recap of https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/94. I'm parking it here in case we can come up with a better solution in the future.
Original design
The original design was to show OSD controls when there's pointer activity:
And show the header bar when the background is clicked/tapped:
The idea here was to have a design that worked well on touch:
- OSD controls only cover actions for which there is a touch equivalent (zoom, pan, etc). Since they are only shown when there's pointer hover, they won't be shown on touch-only devices.
- Showing the header bar on click/tap is what you see on mobile - you get an uncluttered view by default, and then tap to take actions.
Issues and current state
However, there were problems with the original design:
- If you click the window to focus it, it shows the header bar
- Need to click twice to close the window
- Having the OSDs and header hidden, with different actions to reveal each, felt awkward and surprising
The current state is therefore to keep the header bar always visible and only hide the OSD controls:
This should work well for touch, but isn't as ideal for pointer.
Alternatives
One alternative would be to show both the header and overlaid buttons on hover, and accept that we'll be showing unnecessary controls on touch-only devices. However, there are some issues with using the OSD style for the header bar.
If we could detect when we're running on a touch-only device, then we could potentially think about other designs. Say, having no header bar and instead showing different sets of controls on hover/tap, depending on the input devices that are present.