This size is determined to be the best one with the current set of
device SVGs in libratbag. It is set to ensure that the jump in size
caused by the MousePerspective populating itself when switched to is
minimal and the least disturbing. We can't populate the MousePerspective
in advance because we need to know the device.
The welcome and error screens both require a different "perspective"
into Piper, while being in the same window. For this reason, we
introduce a titlebar and a regular stack and the concept of a
"perspective", which is defined as a certain view into Piper.
A perspective needs to implement an interface of sorts of two methods:
one to retrieve its string name, and another to retrieve its widget titlebar.
Different scenarios can then show different perspectives, that have full
control over the main widget and the titlebar displayed. This commit
introduces the MousePerspective, which is a perspective showing the
mouse configuration. Future commits will add an ErrorPerspective and a
WelcomePerspective, and even further into the future we can add a
KeyboardPerspective as well.
This commits adds the necessary bits in the UI to switch between
popovers. Following commits will propagate profile changes through the
rest of Piper so that all control widgets update corresponding to
profile changes.
For the user anyway, all different mappings will look the same. It makes
no sense to make this more complicated for them by separating them into
different concepts.
ratbag's key mapping signature is forcing us to treat modifiers
different from regular keys. To detect them, we need several workarounds
over Gdk.EventKey which makes the code uglier than it could be. Perhaps
we should just skip this altogether and implement macros only; since
they don't differentiate between modifiers and regular keys all these
workaround can then be removed while providing the same functionality.
This list can set a profile's resolutions. Currently, it is limited to
the active profile because there is no support for profiles other than
the default.
Adding and removing resolutions is not yet implemented because this is
not yet exposed through libratbag (see [1]).
[1]: https://github.com/libratbag/libratbag/issues/211
This is just a quick skeleton window for now to be able to test the
MouseMap widget. Eventually this will turn into the mockups.
piper.py is still around to steal code from; it will be removed
eventually when all useful bits have found a place in the new codebase.
A Gtk.Application subclass to handle the application's initialization
and integration with the GNOME stack. It implements the do_startup and
do_activate methods and is responsible for the application's menus,
icons, title and lifetime.
As discussed in #5, this enables better integration with the GNOME stack
through Meson's GNOME module. This will allow us to use GSchemas,
AppData and other GNOME technologies much easier. It will also simplify
building Flatpaks of Piper.