Comment 6 for bug 178336

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the feedback on this, however I'm still sketchy on exactly what changes to make to achieve what you've described. A mockup would almost certainly help, however I think maybe it'd be better if I explained to you how to make the change since the coding is fairly straightforward, and since then you could take time to experiment around and get it exactly as you feel best.

In filter-effects-dialog.cpp, in function FilterEffectsDialog::init_settings_widgets(), single and dual "spin sliders" are created by the function calls add_spinslider() and add_dualspinslider(). You'll see a whole mess of these which add all the parameter controls. For example, here's the code to add the dual spin slider for Gaussian Blur's control:

    _settings->type(NR_FILTER_GAUSSIANBLUR);
    _settings->add_dualspinslider(SP_ATTR_STDDEVIATION, _("Standard Deviation"), 0.01, 100, 1, 0.01, 1);

So those 5 numbers in the function parameters are what controls the steps and stuff. The arguments are low, high, step increment, climb, and digits, in order respectively. Low and high are the minimum and maximum allowed values for the control. Step increment is how much the spinner increments each time you click on an up or down button. Climb rate is the acceleration rate when holding down a button. Digits is the precision (number of digits after the decimal point.)

add_spinslider() has the same five arguments at the end of its list.

So basically, tweak the numbers to what you think they should be, recompile, test, repeat. :-)

I'm not sure about if the sliders can be made logarithmic... I suspect that'd be a more involved coding task, but maybe the controls can be made to work well enough without.

vonHalenbach, I hope this is enough info to get you going; if not just drop me an email and I'll be happy to answer questions. When you get something you're reasonably happy with, do the command `svn diff > spinners.patch`, upload it to this bug and ping me, and I'll give it a review and apply it.