SliderBase is not using padding based on pixel ratio

REPRODUCIBILITY: 100%
OS VERSION: 5.0.0.x and previous
HARDWARE: any
UI LANGUAGE: any
REGRESSION: no

DESCRIPTION:

SliderBase is using following values as a value for left and right padding

    property real leftMargin: Math.round(Screen.width/8)
    property real rightMargin: Math.round(Screen.width/8)

If alarm is not going off in your head right now you’re either not a developer or… anyway. This does not relay on any pixel ratio value like Theme.paddingLarge, meaning, on device like a tablet its absolutely freaking massive, its kilometers long.

PRECONDITIONS:

Use Slider in app

STEPS TO REPRODUCE:

Slider {}

EXPECTED RESULT:

It should use value based on value thats using pixel ratio like Theme.paddingLarge or Theme.horizontalPageMargin which scale according to pixel ratio

ACTUAL RESULT:

It doesn’t, its massive

MODIFICATIONS:

ADDITIONAL INFORMATION:

I would make a PR but its part of private API so I’m yelling in frustration here. FIX IT. Or I’ll fix it myself by getting rid of silica.

Also in case you even dare to think “ah its just magister with his imaginary issue”. Same app. Tablet vs phone


Now imagine just for a second, imagine we used thing that actually scales with pixel ratio like Theme.paddingLarge*3


Wow! They both look good now! How could it be! Magic!

3 Likes

Offtopic: Yay for StezStix Fix!!, stupid Slider!

2 Likes