Issues fixed by this change:
- Empty space above and below layouts.
- The compact shape, which is supposed to be used on small screens,
did not scale up until it reached the border of the screen, on some
screens, resulting in empty space next to it, and smaller buttons.
- The compact shape was used on some screens in horizontal orientation,
instead of the wide shape.
- The panel was rather small on large screens.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/677>
This workaround makes Squeekboard use the wide shape on more devices.
On many devices with wide screens, which should use the wide shape
for layouts while in horizontal orientation, the compact shape was
used instead.
In particular, 5" large displays with an aspect-ratio of 16:9,
which are relatively common, were using the compact shape.
This workaround has the side-effect of allowing for more empty space
above and below the wide shape, to fit the layout into the available area.
The buttons on displays where this would be noticeable,
should still be larger than before.
To find an appropriate point for switching between the shapes without
having the relevant displays to test with,
one can create an image sized according to the device's display-resolution
and pixel-density, place a line representing the height of Squeekboard
(based on the scaling-tests), paste images of compact and wide
layout-shapes into the area and scale them appropriately,
set the image-viewer to show the image according to physical size,
and then compare which one fits better.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/639>
These are based on actual displays/devices.
A display-size-calculator ( https://www.sven.de/dpi/ ) was used to
calculate the width and height from resolution and diagonal display-size.
Some of these tests check for non-optimal results;
however, their purpose is mostly to make it noticeable
how changes to scaling-behaviour affect various
display-types.
When Squeekboard's scaling-behaviour will be improved, the tests
should be updated with values that fit the displays/devices better.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/640>
A redesign of popover was needed: it can no longer query the application state directly due to current state being its own actor, so instead the popover gets a dedicated copy of the relevant state.
I'm not entirely happy with the extra complexity of having an extra actor just for 1 string, but at least the duplication between C and Rust and mutual calls have been reduced.
This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.
The second benefit is that it allows outputs to become part of new state management.