layouts: Fix buttons for Huion and Gaomon tablets #691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
libwacom's SVG format requires that we have an element with
id="ButtonA", one with id="LabelA" and one with id="LeaderA".
The latter is the line pointing to the button. Since OSDs mostly fill in
the button rect when the button is pressed we need the label to be
outside the button and a leader pointing to it.
This patch was (supervised but) generated from a Python script:
all labels are moved to the right and a leader with the right id and
class was inserted. The script supports moving buttons (and adding
leaders) in all four directions, most tablets are ok now. Some tablets
have a less-than optimal layout (e.g. the Huion Mini Keypad) but that
can be fixed by someone with more time and motivation.
Script source:
https://gist.github.com/whot/8f3dbc09908862775b61f7d0a71fd5ed
Fixes: c80bd7f ("Add auto generated GAOMON tablet description files")
Fixes: ce093e7 ("Add auto generated HUION tablet description files")
Related to #659, cc @JoseExposito
Not all SVGs are great, arguably the original format with the button inside is better but unfortunately this is a change to how everything is set up. For now we need the leader lines (and probably someone to fix the various files that are going to be messy in the OSD).