Commit 64ebdab5 authored by DonLakeFlyer's avatar DonLakeFlyer

Fall back to font based min touch if needed to

parent 40fd2041
......@@ -108,15 +108,13 @@ Item {
smallFontPointSize = defaultFontPointSize * _screenTools.smallFontPointRatio
mediumFontPointSize = defaultFontPointSize * _screenTools.mediumFontPointRatio
largeFontPointSize = defaultFontPointSize * _screenTools.largeFontPointRatio
if (isShortScreen) {
// For short screens using physical sizing leads ends up being too large. So we fall back to font
// based sizing.
minTouchPixels = Math.round(minTouchMillimeters * Screen.pixelDensity)
if (minTouchPixels / Screen.height > 0.15) {
// If using physical sizing takes up too much o fthe vertical real estate fall back to font based sizing
minTouchPixels = defaultFontPixelHeight * 3
} else {
// For larger screens we can set min touch sizing to physical sizing
minTouchPixels = Math.round(minTouchMillimeters * Screen.pixelDensity)
}
console.log(minTouchPixels / Screen.height)
toolbarHeight = isMobile ? minTouchPixels : defaultFontPixelHeight * 3
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment