Bug 446755

Summary: Hitbox For Curve Widget Vertices Too Small
Product: [Applications] krita Reporter: Joe Eagar <joeedh>
Component: GeneralAssignee: Tiar <tamtamy.tymona>
Status: RESOLVED FIXED    
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: 4.4.8   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Shows scaled handles

Description Joe Eagar 2021-12-09 21:19:42 UTC
SUMMARY

The hit boxes when editing curve vertices in, for example, the Color Adjustment Filter are far too small.  I'm constantly creating new points where I don't want them.  I can see two possibly causes: either the hitboxes are genuinely too small, or they aren't taking DPI into account on Windows (or possibly both).  

SOFTWARE/OS VERSIONS
Windows:  11
Comment 1 Halla Rempt 2022-03-09 11:43:53 UTC
Created attachment 147388 [details]
Shows scaled handles

It's not that the handles don't scale: if I use QT_SCALING_FACTOR=2 krita, then open the adjustment filter, the handles clearly are scaled. The question is... Is this something that was improved since 4.8, or not. Tiar did a lot of work improving scaled display painting.
Comment 2 Halla Rempt 2022-03-09 13:41:53 UTC
Hm, Windragon says that the problem probably not is in the rendering... I'll have to look into this a bit more.
Comment 3 Tiar 2022-04-02 01:41:22 UTC
Git commit d28aaccfdcc364447583803968f3d4bd9692708c by Agata Cacko.
Committed on 02/04/2022 at 00:50.
Pushed by tymond into branch 'master'.

Fix too small hitboxes for curve widget

Before this commit, it was difficult to click on a control
point of the curve widget, especially with a stylus, because
the hitboxes were quite small.
Some time ago the control boxes were made visually bigger, but
without taking care of hitboxes, so the situation just before this
commit was that the user could click on the ellipse marking
the control point but still create a new point instead of
moving the one the user intended to click on.

This commit ensures that the painting code and the logic code
both use the same value, and that the hitbox for the point is
circular.

M  +10   -10   libs/ui/widgets/kis_curve_widget.cpp
M  +21   -2    libs/ui/widgets/kis_curve_widget_p.h

https://invent.kde.org/graphics/krita/commit/d28aaccfdcc364447583803968f3d4bd9692708c
Comment 4 Tiar 2022-04-11 02:55:39 UTC
Git commit b7e5c9aadad07161622dcd9cf8a17ba0bae707d2 by Agata Cacko.
Committed on 11/04/2022 at 02:55.
Pushed by tymond into branch 'krita/5.0'.

Fix too small hitboxes for curve widget

Before this commit, it was difficult to click on a control
point of the curve widget, especially with a stylus, because
the hitboxes were quite small.
Some time ago the control boxes were made visually bigger, but
without taking care of hitboxes, so the situation just before this
commit was that the user could click on the ellipse marking
the control point but still create a new point instead of
moving the one the user intended to click on.

This commit ensures that the painting code and the logic code
both use the same value, and that the hitbox for the point is
circular.


(cherry picked from commit d28aaccfdcc364447583803968f3d4bd9692708c)

M  +10   -10   libs/ui/widgets/kis_curve_widget.cpp
M  +21   -2    libs/ui/widgets/kis_curve_widget_p.h

https://invent.kde.org/graphics/krita/commit/b7e5c9aadad07161622dcd9cf8a17ba0bae707d2