Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
64ebdab5
Commit
64ebdab5
authored
Jun 27, 2017
by
DonLakeFlyer
Browse files
Fall back to font based min touch if needed to
parent
40fd2041
Changes
1
Show whitespace changes
Inline
Side-by-side
src/QmlControls/ScreenTools.qml
View file @
64ebdab5
...
...
@@ -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
=
defaultFontPixelHeight
*
3
}
else
{
// For larger screens we can set min touch sizing to physical 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
}
console
.
log
(
minTouchPixels
/
Screen
.
height
)
toolbarHeight
=
isMobile
?
minTouchPixels
:
defaultFontPixelHeight
*
3
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment