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
35410336
Unverified
Commit
35410336
authored
Jan 05, 2018
by
Don Gagne
Committed by
GitHub
Jan 05, 2018
Browse files
Merge pull request #5904 from bluerobotics/formatting-fixes
Formatting fixes
parents
55737026
21cff51c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
35410336
...
...
@@ -41,6 +41,8 @@ Item {
function
getPreferredInstrumentWidth
()
{
if
(
ScreenTools
.
isMobile
)
{
return
mainWindow
.
width
*
0.25
}
else
if
(
ScreenTools
.
isHugeScreen
)
{
return
mainWindow
.
width
*
0.11
}
return
ScreenTools
.
defaultFontPixelWidth
*
30
}
...
...
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
35410336
...
...
@@ -82,7 +82,7 @@ Column {
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
fontSize
Mode
:
Text
.
H
or
izontalFit
wrap
Mode
:
Text
.
W
or
dWrap
text
:
fact
.
shortDescription
+
(
fact
.
units
?
"
(
"
+
fact
.
units
+
"
)
"
:
""
)
}
QGCLabel
{
...
...
@@ -105,9 +105,9 @@ Column {
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
shortDescription
}
QGCLabel
{
...
...
src/QmlControls/ScreenTools.qml
View file @
35410336
...
...
@@ -60,6 +60,7 @@ Item {
property
bool
isDebug
:
ScreenToolsController
.
isDebug
property
bool
isTinyScreen
:
(
Screen
.
width
/
Screen
.
pixelDensity
)
<
120
// 120mm
property
bool
isShortScreen
:
ScreenToolsController
.
isMobile
&&
((
Screen
.
height
/
Screen
.
width
)
<
0.6
)
// Nexus 7 for example
property
bool
isHugeScreen
:
Screen
.
width
>=
1920
*
2
readonly
property
real
minTouchMillimeters
:
10
///< Minimum touch size in millimeters
property
real
minTouchPixels
:
0
///< Minimum touch size in pixels
...
...
@@ -90,6 +91,10 @@ Item {
}
}
function
printScreenStats
()
{
console
.
log
(
'
ScreenTools: Screen.width:
'
+
Screen
.
width
+
'
Screen.height:
'
+
Screen
.
height
+
'
Screen.pixelDensity:
'
+
Screen
.
pixelDensity
)
}
/// Returns the current x position of the mouse in global screen coordinates.
function
mouseX
()
{
return
ScreenToolsController
.
mouseX
()
...
...
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