[QQC2 Slider Style] Fix wrong handle positioning when initial value is 1

Authored by filipf on May 7 2019, 10:34 PM.

Description

[QQC2 Slider Style] Fix wrong handle positioning when initial value is 1

Summary:
Old code was not reading value properly when initial value was 1, misplacing the handle as a result.

BUG: 405471

Test Plan:
Tested by running qmlscene with:

import QtQuick.Controls 2.5

Slider {
    from: 1
    to: 5
    stepSize: 1
    //orientation: Qt.Vertical
}

Tested both in horizontal and vertical orientation.

You can also test this in the Mouse KCM, with the Pointer Speed slider.

Reviewers: mart, Plasma, ngraham, broulik

Reviewed By: mart, Plasma, ngraham

Subscribers: broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D21075

Details

Committed
filipfMay 15 2019, 4:34 PM
Reviewer
Plasma
Differential Revision
D21075: [QQC2 Slider Style] Fix wrong handle positioning when initial value is 1
Parents
R858:37b3928f8e9a: GIT_SILENT Upgrade KF5 version to 5.59.0.
Branches
Unknown
Tags
Unknown