Skip to content

Improve consistency in stepping for TaurusValueSpinbox

Carlos Pascual requested to merge github/fork/cpascual/spinbox_steps into develop

TaurusValueSpinBox composes a TaurusValueLineEdit and delegates many of its features to it. But the "singleStep" property is not delegated and this causes inconsistent handling of step increments (e.g. pressing the keyboard up/down arrows ignores the step size, while using the up/down arrows of the spinbox widget takes it into account).

Also, the use of the CTRL and ALT key to modify the step size is not consistently supported in all the possible step triggers (keyboard arrows, spinbox arrows and wheel events). And worse, both modifiers conflict with other roles (the control is used also for "force-applying" and the ALT+mouse for dragging windows)

Fix all these issues by refactoring the stepping feature of TaurusValueLineEdit (an make TaurusSpinbox delegate to it). Note that this involves removing the role as multiplier for the CTRL and ALT keys.

Note: this is an alternative solution to that suggested by @srgblnch in #747

Merge request reports