Bug 495901 - It is not obvious when a custom calibration matrix is set
Summary: It is not obvious when a custom calibration matrix is set
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_tablet (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-06 23:52 UTC by Joshua Goins
Modified: 2024-12-26 02:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Goins 2024-11-06 23:52:23 UTC
We have had multiple accounts of people accidentally breaking their stylus input (like https://invent.kde.org/teams/goals/we-care-about-your-input/-/issues/12) because it isn't immediately obvious the calibration matrix is the issue. While we can make it harder to generate invalid calibration matrices, the UX in general is not great. Unlike the other settings, calibration is hidden away in a dialog and it does not say anywhere that you have a custom calibration matrix set or how to reset it. Users have to guess that the "reset" and "defaults" buttons must be hit to do this.
Comment 1 Joshua Goins 2024-11-06 23:53:46 UTC
Nico pointed out that the KCM should support the "highlight changed setting" thingie that's already present in system settings.
Comment 2 Bug Janitor Service 2024-11-08 01:14:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2626
Comment 3 Joshua Goins 2024-11-10 02:14:11 UTC
Git commit d3044f9be079e530e82c9eca967365424843a0c3 by Joshua Goins.
Committed on 10/11/2024 at 02:14.
Pushed by redstrate into branch 'master'.

kcms/tablet: Begin to highlight settings if they're changed from defaults

This doesn't affect the calibration settings just yet, due to some
issues reading the calibration matrix from D-Bus. Other settings such
as button bindings, mapping modes, orientation and left-handed are
now highlighted.

M  +2    -1    kcms/tablet/ui/PressureCurve.qml
M  +23   -0    kcms/tablet/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/d3044f9be079e530e82c9eca967365424843a0c3
Comment 4 Joshua Goins 2024-12-14 15:50:08 UTC
I think my plan for this is to drop the QMatrix4x4 in Dbus, it's just too hard to support. If it was a string (like the pressure curve) then this is trivial.
Comment 5 Bug Janitor Service 2024-12-22 18:21:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2676
Comment 6 Bug Janitor Service 2024-12-22 18:21:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6936
Comment 7 Joshua Goins 2024-12-26 02:10:40 UTC
Git commit c76a544639f109e679b7dc97423905af380ca6a6 by Joshua Goins.
Committed on 26/12/2024 at 01:56.
Pushed by redstrate into branch 'master'.

backends/libinput: Turn calibration matrix property into a string

Transporting a QMatrix4x4 over D-Bus is difficult, not really helped by
QtDBus. The property doesn't show up in the generated QtDBus interface
for example.

Using QMatrix4x4 also introduced subtle but hard to fix bugs due to the
nature of how QtDBus serialization worked (or doesn't work, usually.)

Now the property uses QString-based serialization ala the pressure curve
property. This is backwards-compatible with existing config values too.

M  +31   -38   src/backends/libinput/device.cpp
M  +13   -6    src/backends/libinput/device.h

https://invent.kde.org/plasma/kwin/-/commit/c76a544639f109e679b7dc97423905af380ca6a6
Comment 8 Joshua Goins 2024-12-26 02:36:28 UTC
Git commit e0a185353fcdcc9cc7ac8643a7aceede7cee8e53 by Joshua Goins.
Committed on 26/12/2024 at 02:23.
Pushed by redstrate into branch 'master'.

kcms/tablet: Highlight the calibration matrix as changed, use better UX

Now it acts like a proper setting, being saved/restored like any other
setting in this KCM. Also, it's now highlighted when it's changed.

M  +34   -7    kcms/libkwindevices/inputdevice.cpp
M  +20   -9    kcms/libkwindevices/inputdevice.h
M  +0    -29   kcms/tablet/kcmtablet.cpp
M  +4    -0    kcms/tablet/ui/StylusTab.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/e0a185353fcdcc9cc7ac8643a7aceede7cee8e53