Simplify Rangepick widget to fix issues on Debian Buster
Created by: matthijskooijman
This simplifies the Rangepick widget by using gtk.Popover
and gtk.MenuButton
, conveniently handle a lot of the boilerplate of hiding and showing the popup automatically. This also allows removing some problematic code, fixing #639 (closed) and because no separate window is created anymore, this indirectly also fixes #645 (closed).
This slightly changes the looks of the popup, previously it was:
Now it is:
Note the "arrow", border and slightly different positioning of the popup.
One downside of using a Popover is that it is a widget, rather than an window, so at least on X11, it cannot extend outside of the containing window, but this is probably not a problem in practice (this limitation does not seem to exist on Wayland, see https://gitlab.gnome.org/GNOME/gtk/-/issues/543).
This PR supersedes #643 and as far as I'm concerned, is how we should be fixing these issues.
@taniwallach, would you be so kind to give this PR a final test on your two machines?
@others, anyone want to give this PR a technical review, so we can get it merged?