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
So I guess you’re talking about the vertical slider on top right corner? Suppose that’s the Slider with some rotation?
Anyhow, I think the biggest problem with Slider is maybe lack of documentation for leftMargin and rightMargin. Should be up to the app developer to set if the defaults are not good. One size will not fit all.
Also the defaults here would be also dangerous to adjust as that would affect all the places where a Slider is used. Commonly it’s probably quite fine already.
You may disagree but I’m not changing the default now. And even if that was changed, a pixel ratio based value would be still something big by default, somewhere around what it’s effectively now, so your application case would be just as broken.
So just set the leftMargin and rightMargin to something that fits your case better. It’s two lines of code.
I don’t have any technical knowledge to share with this topic, but wouldn’t it make sense to check if @Mister_Magister is right? As he demonstrated in his report, with his suggestion problem should be fixed. If we can get from mostly ok, to very good with low effort, sounds like low hanging fruit where everyone wins. Devs have one less thing to worry about, users get nicer user experience and Jolla gets point for fixing known problem
not really, no point making opal component just to change two properties and system and 99% of apps will still be incorrect on every single tablet in existance