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
f2cb88eb
Commit
f2cb88eb
authored
Feb 29, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2915 from DonLakeFlyer/SmallScreenSettings
Settings: Fix for small screens
parents
834c862c
0c7e970a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
156 additions
and
134 deletions
+156
-134
QGCLabel.qml
src/QmlControls/QGCLabel.qml
+1
-0
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+21
-15
MainWindowLeftPanel.qml
src/ui/MainWindowLeftPanel.qml
+91
-80
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+2
-3
LinkSettings.qml
src/ui/preferences/LinkSettings.qml
+0
-4
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+3
-3
MockLink.qml
src/ui/preferences/MockLink.qml
+38
-29
No files found.
src/QmlControls/QGCLabel.qml
View file @
f2cb88eb
...
@@ -11,6 +11,7 @@ Text {
...
@@ -11,6 +11,7 @@ Text {
property
bool
enabled
:
true
property
bool
enabled
:
true
font.pixelSize
:
ScreenTools
.
defaultFontPixelSize
font.pixelSize
:
ScreenTools
.
defaultFontPixelSize
fontSizeMode
:
Text
.
HorizontalFit
color
:
__qgcPal
.
text
color
:
__qgcPal
.
text
antialiasing
:
true
antialiasing
:
true
}
}
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
f2cb88eb
...
@@ -156,6 +156,7 @@ Rectangle {
...
@@ -156,6 +156,7 @@ Rectangle {
errorDialog
.
visible
=
false
errorDialog
.
visible
=
false
}
}
}
}
Rectangle
{
Rectangle
{
id
:
_offlineMapTopRect
id
:
_offlineMapTopRect
width
:
parent
.
width
width
:
parent
.
width
...
@@ -180,25 +181,29 @@ Rectangle {
...
@@ -180,25 +181,29 @@ Rectangle {
}
}
}
}
}
}
QGCFlickable
{
QGCFlickable
{
id
:
_tileSetList
id
:
_tileSetList
clip
:
true
clip
:
true
anchors.top
:
_offlineMapTopRect
.
bottom
anchors.top
:
_offlineMapTopRect
.
bottom
width
:
parent
.
width
anchors.left
:
parent
.
left
height
:
parent
.
height
-
_offlineMapTopRect
.
height
anchors.right
:
parent
.
right
anchors.bottom
:
_optionsButton
.
top
contentHeight
:
_cacheList
.
height
contentHeight
:
_cacheList
.
height
contentWidth
:
parent
.
width
flickableDirection
:
Flickable
.
VerticalFlick
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
_cacheList
id
:
_cacheList
width
:
_offlineMapRoot
.
width
width
:
Math
.
min
(
parent
.
width
,
(
ScreenTools
.
defaultFontPixelWidth
*
50
).
toFixed
(
0
))
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
(
ScreenTools
.
defaultFontPixelHeight
*
0.5
).
toFixed
(
0
)
spacing
:
(
ScreenTools
.
defaultFontPixelHeight
*
0.5
).
toFixed
(
0
)
anchors.horizontalCenter
:
parent
.
horizontalCenter
OfflineMapButton
{
OfflineMapButton
{
text
:
"
Add new set
"
text
:
"
Add new set
"
width
:
(
ScreenTools
.
defaultFontPixelWidth
*
50
).
toFixed
(
0
)
anchors.left
:
parent
.
left
height
:
(
ScreenTools
.
defaultFontPixelHeight
*
2
).
toFixed
(
0
)
anchors.right
:
parent
.
right
anchors.horizontalCenter
:
parent
.
horizontalCenter
height
:
(
ScreenTools
.
defaultFontPixelHeight
*
2
).
toFixed
(
0
)
onClicked
:
{
onClicked
:
{
_offlineMapRoot
.
_currentSelection
=
null
_offlineMapRoot
.
_currentSelection
=
null
showMap
()
showMap
()
...
@@ -207,12 +212,12 @@ Rectangle {
...
@@ -207,12 +212,12 @@ Rectangle {
Repeater
{
Repeater
{
model
:
QGroundControl
.
mapEngineManager
.
tileSets
model
:
QGroundControl
.
mapEngineManager
.
tileSets
delegate
:
OfflineMapButton
{
delegate
:
OfflineMapButton
{
text
:
object
.
name
text
:
object
.
name
size
:
object
.
downloadStatus
size
:
object
.
downloadStatus
complete
:
object
.
complete
complete
:
object
.
complete
width
:
(
ScreenTools
.
defaultFontPixelWidth
*
50
).
toFixed
(
0
)
anchors.left
:
parent
.
left
height
:
(
ScreenTools
.
defaultFontPixelHeight
*
2
).
toFixed
(
0
)
anchors.right
:
parent
.
right
anchors.horizontalCenter
:
parent
.
horizontalCenter
height
:
(
ScreenTools
.
defaultFontPixelHeight
*
2
).
toFixed
(
0
)
onClicked
:
{
onClicked
:
{
_offlineMapRoot
.
_currentSelection
=
object
_offlineMapRoot
.
_currentSelection
=
object
showInfo
()
showInfo
()
...
@@ -221,16 +226,17 @@ Rectangle {
...
@@ -221,16 +226,17 @@ Rectangle {
}
}
}
}
}
}
QGCButton
{
QGCButton
{
id
:
_optionsButton
id
:
_optionsButton
text
:
"
Options
"
text
:
"
Options
"
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
visible
:
_tileSetList
.
visible
visible
:
_tileSetList
.
visible
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
onClicked
:
showOptions
()
onClicked
:
showOptions
()
}
}
//-- Offline Map Definition
//-- Offline Map Definition
Rectangle
{
Rectangle
{
id
:
_mapView
id
:
_mapView
...
...
src/ui/MainWindowLeftPanel.qml
View file @
f2cb88eb
...
@@ -42,6 +42,7 @@ Item {
...
@@ -42,6 +42,7 @@ Item {
readonly
property
int
__animationDuration
:
100
readonly
property
int
__animationDuration
:
100
readonly
property
real
__closeButtonSize
:
ScreenTools
.
defaultFontPixelHeight
*
2
readonly
property
real
__closeButtonSize
:
ScreenTools
.
defaultFontPixelHeight
*
2
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
onVisibleChanged
:
{
onVisibleChanged
:
{
//-- Unselect any selected button
//-- Unselect any selected button
...
@@ -129,103 +130,113 @@ Item {
...
@@ -129,103 +130,113 @@ Item {
// This is the menu dialog panel which is anchored to the left edge
// This is the menu dialog panel which is anchored to the left edge
Rectangle
{
Rectangle
{
id
:
__leftMenu
id
:
__leftMenu
width
:
(
tbButtonWidth
*
2
)
+
(
tbSpacing
*
4
)
+
1
width
:
ScreenTools
.
defaultFontPixelWidth
*
12
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.top
:
__topSeparator
.
bottom
anchors.top
:
__topSeparator
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
color
:
__qgcPal
.
windowShadeDark
color
:
__qgcPal
.
windowShadeDark
ExclusiveGroup
{
id
:
panelActionGroup
}
QGCFlickable
{
anchors.fill
:
parent
contentHeight
:
buttonColumn
.
height
+
_margins
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
Column
{
ExclusiveGroup
{
id
:
panelActionGroup
}
width
:
parent
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
Column
{
Item
{
id
:
buttonColumn
width
:
1
anchors.leftMargin
:
_margins
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.rightMargin
:
_margins
}
anchors.left
:
parent
.
left
QGCLabel
{
anchors.right
:
parent
.
right
text
:
"
Preferences
"
anchors.topMargin
:
_margins
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.top
:
parent
.
top
}
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCButton
{
width
:
parent
.
width
*
0.85
QGCLabel
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
Preferences
"
text
:
"
General
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
exclusiveGroup
:
panelActionGroup
}
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
QGCButton
{
if
(
__rightPanel
.
source
!=
"
GeneralSettings.qml
"
)
{
anchors.left
:
parent
.
left
__rightPanel
.
source
=
"
GeneralSettings.qml
"
anchors.right
:
parent
.
right
text
:
"
General
"
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
GeneralSettings.qml
"
)
{
__rightPanel
.
source
=
"
GeneralSettings.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.85
anchors.left
:
parent
.
left
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
anchors.right
:
parent
.
right
text
:
"
Comm Links
"
text
:
"
Comm Links
"
exclusiveGroup
:
panelActionGroup
exclusiveGroup
:
panelActionGroup
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
LinkSettings.qml
"
)
{
if
(
__rightPanel
.
source
!=
"
LinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
LinkSettings.qml
"
__rightPanel
.
source
=
"
LinkSettings.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.85
anchors.left
:
parent
.
left
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
anchors.right
:
parent
.
right
text
:
"
Offline Maps
"
text
:
"
Offline Maps
"
exclusiveGroup
:
panelActionGroup
exclusiveGroup
:
panelActionGroup
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
OfflineMap.qml
"
)
{
if
(
__rightPanel
.
source
!=
"
OfflineMap.qml
"
)
{
__rightPanel
.
source
=
"
OfflineMap.qml
"
__rightPanel
.
source
=
"
OfflineMap.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.85
anchors.left
:
parent
.
left
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
anchors.right
:
parent
.
right
text
:
"
MavLink
"
text
:
"
MavLink
"
exclusiveGroup
:
panelActionGroup
exclusiveGroup
:
panelActionGroup
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MavlinkSettings.qml
"
)
{
if
(
__rightPanel
.
source
!=
"
MavlinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
MavlinkSettings.qml
"
__rightPanel
.
source
=
"
MavlinkSettings.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.85
anchors.left
:
parent
.
left
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
anchors.right
:
parent
.
right
text
:
"
Mock Link
"
text
:
"
Mock Link
"
visible
:
ScreenTools
.
isDebug
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
exclusiveGroup
:
panelActionGroup
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MockLink.qml
"
)
{
if
(
__rightPanel
.
source
!=
"
MockLink.qml
"
)
{
__rightPanel
.
source
=
"
MockLink.qml
"
__rightPanel
.
source
=
"
MockLink.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.85
anchors.left
:
parent
.
left
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
anchors.right
:
parent
.
right
text
:
"
Debug
"
text
:
"
Debug
"
visible
:
ScreenTools
.
isDebug
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
exclusiveGroup
:
panelActionGroup
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
DebugWindow.qml
"
)
{
if
(
__rightPanel
.
source
!=
"
DebugWindow.qml
"
)
{
__rightPanel
.
source
=
"
DebugWindow.qml
"
__rightPanel
.
source
=
"
DebugWindow.qml
"
}
checked
=
true
}
}
checked
=
true
}
}
}
}
}
}
...
...
src/ui/preferences/GeneralSettings.qml
View file @
f2cb88eb
...
@@ -49,14 +49,13 @@ Rectangle {
...
@@ -49,14 +49,13 @@ Rectangle {
clip
:
true
clip
:
true
anchors.fill
:
parent
anchors.fill
:
parent
contentHeight
:
settingsColumn
.
height
contentHeight
:
settingsColumn
.
height
contentWidth
:
_generalRoot
.
width
contentWidth
:
settingsColumn
.
width
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
settingsColumn
id
:
settingsColumn
width
:
_generalRoot
.
width
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
QGCLabel
{
QGCLabel
{
text
:
"
General Settings
"
text
:
"
General Settings
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
...
...
src/ui/preferences/LinkSettings.qml
View file @
f2cb88eb
...
@@ -134,7 +134,6 @@ Rectangle {
...
@@ -134,7 +134,6 @@ Rectangle {
}
}
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
text
:
"
Edit
"
text
:
"
Edit
"
enabled
:
_currentSelection
&&
!
_currentSelection
.
link
enabled
:
_currentSelection
&&
!
_currentSelection
.
link
onClicked
:
{
onClicked
:
{
...
@@ -142,14 +141,12 @@ Rectangle {
...
@@ -142,14 +141,12 @@ Rectangle {
}
}
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
text
:
"
Add
"
text
:
"
Add
"
onClicked
:
{
onClicked
:
{
_linkRoot
.
openCommSettings
(
null
)
_linkRoot
.
openCommSettings
(
null
)
}
}
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
text
:
"
Connect
"
text
:
"
Connect
"
enabled
:
_currentSelection
&&
!
_currentSelection
.
link
enabled
:
_currentSelection
&&
!
_currentSelection
.
link
onClicked
:
{
onClicked
:
{
...
@@ -158,7 +155,6 @@ Rectangle {
...
@@ -158,7 +155,6 @@ Rectangle {
}
}
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
text
:
"
Disconnect
"
text
:
"
Disconnect
"
enabled
:
_currentSelection
&&
_currentSelection
.
link
enabled
:
_currentSelection
&&
_currentSelection
.
link
onClicked
:
{
onClicked
:
{
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
f2cb88eb
...
@@ -48,14 +48,14 @@ Rectangle {
...
@@ -48,14 +48,14 @@ Rectangle {
anchors.fill
:
parent
anchors.fill
:
parent
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
contentHeight
:
settingsColumn
.
height
contentHeight
:
settingsColumn
.
height
contentWidth
:
__mavlinkRoot
.
width
contentWidth
:
settingsColumn
.
width
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
settingsColumn
id
:
settingsColumn
width
:
__mavlinkRoot
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
spacing
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
QGCLabel
{
QGCLabel
{
text
:
"
MavLink Settings
"
text
:
"
MavLink Settings
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
...
...
src/ui/preferences/MockLink.qml
View file @
f2cb88eb
...
@@ -29,39 +29,48 @@ import QGroundControl.Palette 1.0
...
@@ -29,39 +29,48 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
Rectangle
{
color
:
qgcPal
.
window
color
:
qgcPal
.
window
anchors.fill
:
parent
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
Column
{
QGCFlickable
{
anchors.
margins
:
ScreenTools
.
defaultFontPixelHeigh
t
anchors.
fill
:
paren
t
anchors.left
:
parent
.
left
contentWidth
:
column
.
width
anchors.top
:
parent
.
top
contentHeight
:
column
.
height
spacing
:
ScreenTools
.
defaultFontPixelHeight
clip
:
true
QGCButton
{
Column
{
text
:
"
PX4 Vehicle
"
id
:
column
onClicked
:
QGroundControl
.
startPX4MockLink
(
sendStatusText
.
checked
)
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
}
anchors.left
:
parent
.
left
QGCButton
{
anchors.top
:
parent
.
top
text
:
"
APM ArduCopter Vehicle
"
spacing
:
ScreenTools
.
defaultFontPixelHeight
onClicked
:
QGroundControl
.
startAPMArduCopterMockLink
(
sendStatusText
.
checked
)
}
QGCButton
{
QGCButton
{
text
:
"
PX4 Vehicle
"
text
:
"
APM ArduPlane Vehicle
"
onClicked
:
QGroundControl
.
startPX4MockLink
(
sendStatusText
.
checked
)
onClicked
:
QGroundControl
.
startAPMArduPlaneMockLink
(
sendStatusText
.
checked
)
}
}
QGCButton
{
QGCButton
{
text
:
"
APM ArduCopter Vehicle
"
text
:
"
Generic Vehicle
"
onClicked
:
QGroundControl
.
startAPMArduCopterMockLink
(
sendStatusText
.
checked
)
onClicked
:
QGroundControl
.
startGenericMockLink
(
sendStatusText
.
checked
)
}
}
QGCButton
{
QGCCheckBox
{
text
:
"
APM ArduPlane Vehicle
"
id
:
sendStatusText
onClicked
:
QGroundControl
.
startAPMArduPlaneMockLink
(
sendStatusText
.
checked
)
text
:
"
Send status text + voice
"
}
}
QGCButton
{
QGCButton
{
text
:
"
Generic Vehicle
"
text
:
"
Stop All MockLinks
"
onClicked
:
QGroundControl
.
startGenericMockLink
(
sendStatusText
.
checked
)
onClicked
:
QGroundControl
.
stopAllMockLinks
()
}
QGCCheckBox
{
id
:
sendStatusText
text
:
"
Send status text + voice
"
}
QGCButton
{
text
:
"
Stop All MockLinks
"
onClicked
:
QGroundControl
.
stopAllMockLinks
()
}
}
}
}
}
}
}
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