make pageStepMode default false

This commit is contained in:
FarmRadio Hangar 2016-05-10 17:29:50 +03:00
parent d388183f84
commit 0ef2d96318
2 changed files with 7 additions and 6 deletions

View File

@ -148,7 +148,8 @@ void Slider::mousePressEvent(QMouseEvent *event)
if (!d->pageStepMode) { if (!d->pageStepMode) {
setSliderPosition(d->valueFromPosition(event->pos())); setSliderPosition(d->valueFromPosition(event->pos()));
//setSliderDown(true); d->thumb->setHaloSize(0);
setSliderDown(true);
return; return;
} }

View File

@ -51,7 +51,7 @@ SliderPrivate::SliderPrivate(Slider *parent)
hoverTrack(false), hoverTrack(false),
hoverThumb(false), hoverThumb(false),
step(false), step(false),
pageStepMode(true), pageStepMode(false),
stepTo(0), stepTo(0),
oldValue(parent->value()) oldValue(parent->value())
{ {
@ -163,20 +163,20 @@ void SliderPrivate::init(Slider *slider)
transition = new QSignalTransition(slider, SIGNAL(changedToMinimum())); transition = new QSignalTransition(slider, SIGNAL(changedToMinimum()));
transition->setTargetState(normalState); transition->setTargetState(normalState);
animation = new QPropertyAnimation(thumb, "fillColor"); animation = new QPropertyAnimation(thumb, "fillColor");
animation->setDuration(400); animation->setDuration(200);
transition->addAnimation(animation); transition->addAnimation(animation);
animation = new QPropertyAnimation(thumb, "borderWidth"); animation = new QPropertyAnimation(thumb, "borderWidth");
animation->setDuration(400); animation->setDuration(200);
transition->addAnimation(animation); transition->addAnimation(animation);
minState->addTransition(transition); minState->addTransition(transition);
transition = new QSignalTransition(slider, SIGNAL(changedFromMinimum())); transition = new QSignalTransition(slider, SIGNAL(changedFromMinimum()));
transition->setTargetState(minState); transition->setTargetState(minState);
animation = new QPropertyAnimation(thumb, "fillColor"); animation = new QPropertyAnimation(thumb, "fillColor");
animation->setDuration(400); animation->setDuration(200);
transition->addAnimation(animation); transition->addAnimation(animation);
animation = new QPropertyAnimation(thumb, "borderWidth"); animation = new QPropertyAnimation(thumb, "borderWidth");
animation->setDuration(400); animation->setDuration(200);
transition->addAnimation(animation); transition->addAnimation(animation);
normalState->addTransition(transition); normalState->addTransition(transition);