Bug 414364

Summary: wrong percent indication in kruler
Product: [Applications] kruler Reporter: kadlecf
Component: generalAssignee: Mathias Soeken <soeken>
Status: REPORTED ---    
Severity: minor    
Priority: NOR    
Version First Reported In: 19.08.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of kruler

Description kadlecf 2019-11-21 14:11:55 UTC
Created attachment 124045 [details]
screenshot of kruler

SUMMARY
I am using Kruler 19.08.3 under OpenSuSE Tumbleweed. I noticed that in the percent mode (Scale | [X] Percentage), the dynamic value indications are not correct - see attached screenshot. For any position of the cursor, the indicated integral percent value is as follows: 

For cursor between 0 and ~1.1: 0 is shown.
For cursor between 1.2 and ~2.1: 1 is shown.
For cursor between 2.2 and ~3.1: 2 is shown.
etc. 
This is simplified, to some extent; I don't know the exact way of converting pixels into percentage. But this rounding is clearly wrong. I would expect one of the following:

For cursor between 0 and ~0.9: 0 is shown.
For cursor between 1 and ~1.9: 1 is shown.
For cursor between 2 and ~2.9: 2 is shown.
etc.; or, 

For cursor between 0 and ~0.5: 0 is shown.
For cursor between .6 and ~1.5: 1 is shown.
For cursor between 1.6 and ~2.5: 2 is shown.
etc.

Linux: OpenSuSE Tumbleweed

KDE Frameworks 5.64.0
Qt 5.13.1 (built against 5.13.1)
The xcb windowing system
KDE Frameworks Version: