Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1f77b2f7
Commit
1f77b2f7
authored
Mar 08, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QGC replacement for MouseArea
Shows touch area extents when turned on
parent
21b110ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
QGCMouseArea.qml
src/QmlControls/QGCMouseArea.qml
+12
-0
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+5
-1
No files found.
qgroundcontrol.qrc
View file @
1f77b2f7
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
<file alias="QGroundControl/Controls/QGCMapLabel.qml">src/QmlControls/QGCMapLabel.qml</file>
<file alias="QGroundControl/Controls/QGCMapLabel.qml">src/QmlControls/QGCMapLabel.qml</file>
<file alias="QGroundControl/Controls/QGCMobileFileOpenDialog.qml">src/QmlControls/QGCMobileFileOpenDialog.qml</file>
<file alias="QGroundControl/Controls/QGCMobileFileOpenDialog.qml">src/QmlControls/QGCMobileFileOpenDialog.qml</file>
<file alias="QGroundControl/Controls/QGCMobileFileSaveDialog.qml">src/QmlControls/QGCMobileFileSaveDialog.qml</file>
<file alias="QGroundControl/Controls/QGCMobileFileSaveDialog.qml">src/QmlControls/QGCMobileFileSaveDialog.qml</file>
<file alias="QGroundControl/Controls/QGCMouseArea.qml">src/QmlControls/QGCMouseArea.qml</file>
<file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file>
<file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file>
<file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file>
<file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file>
<file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file>
<file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file>
...
...
src/QmlControls/QGCMouseArea.qml
0 → 100644
View file @
1f77b2f7
import
QtQuick
2.3
import
QGroundControl
1.0
MouseArea
{
Rectangle
{
anchors.fill
:
parent
border.color
:
"
red
"
border.width
:
QGroundControl
.
showTouchAreas
?
1
:
0
color
:
"
transparent
"
}
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
1f77b2f7
...
@@ -37,6 +37,7 @@ QGCListView 1.0 QGCListView.qml
...
@@ -37,6 +37,7 @@ QGCListView 1.0 QGCListView.qml
QGCMapLabel 1.0 QGCMapLabel.qml
QGCMapLabel 1.0 QGCMapLabel.qml
QGCMobileFileOpenDialog 1.0 QGCMobileFileOpenDialog.qml
QGCMobileFileOpenDialog 1.0 QGCMobileFileOpenDialog.qml
QGCMobileFileSaveDialog 1.0 QGCMobileFileSaveDialog.qml
QGCMobileFileSaveDialog 1.0 QGCMobileFileSaveDialog.qml
QGCMouseArea 1.0 QGCMouseArea.qml
QGCMovableItem 1.0 QGCMovableItem.qml
QGCMovableItem 1.0 QGCMovableItem.qml
QGCPipable 1.0 QGCPipable.qml
QGCPipable 1.0 QGCPipable.qml
QGCRadioButton 1.0 QGCRadioButton.qml
QGCRadioButton 1.0 QGCRadioButton.qml
...
...
src/QmlControls/ScreenTools.qml
View file @
1f77b2f7
...
@@ -60,6 +60,9 @@ Item {
...
@@ -60,6 +60,9 @@ Item {
property
bool
isTinyScreen
:
(
Screen
.
width
/
Screen
.
pixelDensity
)
<
120
// 120mm
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
isShortScreen
:
ScreenToolsController
.
isMobile
&&
((
Screen
.
height
/
Screen
.
width
)
<
0.6
)
// Nexus 7 for example
readonly
property
real
minTouchMillimeters
:
10
///< Minimum touch size in millimeters
property
real
minTouchPixels
:
0
///< Minimum touch size in pixels
// The implicit heights/widths for our custom control set
// The implicit heights/widths for our custom control set
property
real
implicitButtonWidth
:
Math
.
round
(
defaultFontPixelWidth
*
(
isMobile
?
7.0
:
5.0
))
property
real
implicitButtonWidth
:
Math
.
round
(
defaultFontPixelWidth
*
(
isMobile
?
7.0
:
5.0
))
property
real
implicitButtonHeight
:
Math
.
round
(
defaultFontPixelHeight
*
(
isMobile
?
2.0
:
1.6
))
property
real
implicitButtonHeight
:
Math
.
round
(
defaultFontPixelHeight
*
(
isMobile
?
2.0
:
1.6
))
...
@@ -101,7 +104,8 @@ Item {
...
@@ -101,7 +104,8 @@ Item {
smallFontPointSize
=
defaultFontPointSize
*
_screenTools
.
smallFontPointRatio
smallFontPointSize
=
defaultFontPointSize
*
_screenTools
.
smallFontPointRatio
mediumFontPointSize
=
defaultFontPointSize
*
_screenTools
.
mediumFontPointRatio
mediumFontPointSize
=
defaultFontPointSize
*
_screenTools
.
mediumFontPointRatio
largeFontPointSize
=
defaultFontPointSize
*
_screenTools
.
largeFontPointRatio
largeFontPointSize
=
defaultFontPointSize
*
_screenTools
.
largeFontPointRatio
toolbarHeight
=
defaultFontPixelHeight
*
3
*
QGroundControl
.
corePlugin
.
options
.
toolbarHeightMultiplier
minTouchPixels
=
Math
.
round
(
minTouchMillimeters
*
Screen
.
pixelDensity
)
toolbarHeight
=
isMobile
?
minTouchPixels
:
defaultFontPixelHeight
*
3
}
}
Text
{
Text
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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