Bug 216630 - Sliders using RDoubleNumInput are not precise
Summary: Sliders using RDoubleNumInput are not precise
Status: RESOLVED DUPLICATE of bug 168022
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: SVN
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-29 12:03 UTC by Julien Narboux
Modified: 2009-12-01 01:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Narboux 2009-11-29 12:03:38 UTC
Version:           1.0.0rc (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

Using Digikam 1.0.0svn rev1055453, libkdcraw 0.5.0, the sliders using RDoubleNumInput can not be used precisely.
When I try to change gamma value in image editor for instance, the mouse slider for gamma jumps from one value to another, for instance it is not possible to select a value between 0.68 and 0.97 with the slider. The contrast and lightness sliders works perfectly.

Maybe I need to install another version of kdelibs ? libkdcraw ?

Julien
Comment 1 caulier.gilles 2009-11-29 13:13:37 UTC
We use this widget :

http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKDoubleNumInput.html

from libkdcraw :

http://lxr.kde.org/source/KDE/kdegraphics/libs/libkdcraw/libkdcraw/rnuminput.cpp#163

Try to look if an option is not missing somewhere to setup KDoubleNumInput.

Note : problem is reproducible with trunk code

If there is no option missing, it's a problem with KDELibs

Gilles Caulier
Comment 2 Andi Clemens 2009-11-29 13:30:56 UTC
As far as I know, it is a KDElibs issue
Comment 3 Christoph Feck 2009-11-29 21:50:53 UTC
Some remarks, which may, or may not be obvious.

1. A slider cannot generate more distinct values than the number of pixels it has, so the precision depends on the range of values that you want to set. For example, if your slider has a range of 0 ... 1000, but is only 200 pixels wide, you can only change values in steps of 5 units. If the behavior of KDoubleNumInput is worse, please attach a testcase.

2. From looking at rnuminput.cpp, the slider does not use the exponential slider feature (setExponentRatio), which is especially suited for gamma values (e.g. changing in the range of 0.5 ... 2.0, where 1.0 is the center value). You could try, if this helps.
Comment 4 Julien Narboux 2009-11-29 22:03:13 UTC
Hi,

Thanks for your answers.

1 - Yes it is worse than that in our test case, it is as if there were some kind of "snap to grid". The slider can be put only at 10 positions whereas it is clearly longer than 10 pixels. 

2 - I discovered the setExponetnRatio today, you are right it should be used in Digikam for many sliders.

Julien
Comment 5 Christoph Feck 2009-12-01 01:20:18 UTC

*** This bug has been marked as a duplicate of bug 168022 ***