Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layouts: Fix buttons for Huion and Gaomon tablets #691

Merged
merged 1 commit into from
May 14, 2024

Conversation

whot
Copy link
Member

@whot whot commented May 14, 2024

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).

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")
Copy link
Contributor

@JoseExposito JoseExposito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. The design is not perfect, but it'll incentive tablet owners to fix it.

@whot whot merged commit c3225fb into linuxwacom:master May 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants