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
1c4e2252
Unverified
Commit
1c4e2252
authored
Apr 14, 2020
by
Don Gagne
Committed by
GitHub
Apr 14, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8658 from mavlink/PopupDialogFlickable
Fix QGCPopupDialog automatic flickable parenting
parents
ccd2a1ed
12ed0dc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
45 deletions
+45
-45
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+1
-1
QGCPopupDialogContainer.qml
src/QmlControls/QGCPopupDialogContainer.qml
+44
-44
No files found.
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
1c4e2252
...
...
@@ -545,7 +545,7 @@ Column {
ColorDialog
{
id
:
colorPickerDialog
modality
:
Qt
.
ApplicationModal
currentColor
:
instrumentValue
.
rangeColors
[
colorIndex
]
currentColor
:
instrumentValue
.
rangeColors
.
length
?
instrumentValue
.
rangeColors
[
colorIndex
]
:
"
white
"
onAccepted
:
updateColorValue
(
colorIndex
,
color
)
property
int
colorIndex
:
0
...
...
src/QmlControls/QGCPopupDialogContainer.qml
View file @
1c4e2252
...
...
@@ -23,19 +23,19 @@ Popup {
id
:
popupRoot
anchors.centerIn
:
parent
width
:
main
Flickable
.
width
+
(
padding
*
2
)
height
:
main
Flickable
.
height
+
(
padding
*
2
)
width
:
main
ColumnLayout
.
width
+
(
padding
*
2
)
height
:
main
ColumnLayout
.
y
+
mainColumnLayout
.
height
+
padding
padding
:
2
modal
:
true
focus
:
true
property
var
_pal
:
QGroundControl
.
globalPalette
property
real
_frameSize
:
ScreenTools
.
defaultFontPixelWidth
property
var
_pal
:
QGroundControl
.
globalPalette
property
real
_frameSize
:
ScreenTools
.
defaultFontPixelWidth
property
string
_dialogTitle
property
real
_contentMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
property
real
_popupDoubleInset
:
ScreenTools
.
defaultFontPixelHeight
*
2
property
real
_max
AvailableWidth
:
parent
.
width
-
_popupDoubleInset
property
real
_max
AvailableHeight
:
paren
t
.
height
-
_popupDoubleInset
property
real
_contentMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
property
real
_popupDoubleInset
:
ScreenTools
.
defaultFontPixelHeight
*
2
property
real
_max
ContentWidth
:
parent
.
width
-
_popupDoubleInset
property
real
_max
ContentHeight
:
parent
.
height
-
titleRowLayou
t
.
height
-
_popupDoubleInset
background
:
Item
{
Rectangle
{
...
...
@@ -160,51 +160,51 @@ Popup {
onHideDialog
:
close
()
}
QGCFlickable
{
id
:
mainFlickable
width
:
Math
.
min
(
mainColumnLayout
.
width
,
_maxAvailableWidth
)
height
:
Math
.
min
(
mainColumnLayout
.
height
,
_maxAvailableHeight
)
contentWidth
:
mainColumnLayout
.
width
contentHeight
:
mainColumnLayout
.
height
Rectangle
{
width
:
titleRowLayout
.
width
height
:
titleRowLayout
.
height
color
:
qgcPal
.
windowShade
}
Rectangle
{
width
:
titleRowLayout
.
width
height
:
titleRowLayout
.
height
color
:
qgcPal
.
windowShade
}
ColumnLayout
{
id
:
mainColumnLayout
spacing
:
_contentMargin
Column
Layout
{
id
:
mainColumn
Layout
spacing
:
_contentMargin
Row
Layout
{
id
:
titleRow
Layout
Layout.fillWidth
:
true
RowLayout
{
id
:
titleRowLayout
QGCLabel
{
Layout.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
Layout.fillWidth
:
true
text
:
_dialogTitle
height
:
parent
.
height
verticalAlignment
:
Text
.
AlignVCenter
}
QGCLabel
{
Layout.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
Layout.fillWidth
:
true
text
:
title
height
:
parent
.
height
verticalAlignment
:
Text
.
AlignVCenter
}
QGCButton
{
id
:
rejectButton
onClicked
:
dialogComponentLoader
.
item
.
reject
()
}
QGCButton
{
id
:
rejectButton
onClicked
:
dialogComponentLoader
.
item
.
reject
()
}
QGCButton
{
id
:
acceptButton
primary
:
true
onClicked
:
dialogComponentLoader
.
item
.
accept
()
}
QGCButton
{
id
:
acceptButton
primary
:
true
onClicked
:
dialogComponentLoader
.
item
.
accept
()
}
}
QGCFlickable
{
id
:
mainFlickable
Layout.preferredWidth
:
Math
.
min
(
marginItem
.
width
,
_maxContentWidth
)
Layout.preferredHeight
:
Math
.
min
(
marginItem
.
height
,
_maxContentHeight
)
contentWidth
:
marginItem
.
width
contentHeight
:
marginItem
.
height
Item
{
id
:
i
tem
Layout.preferredW
idth
:
dialogComponentLoader
.
width
+
(
_contentMargin
*
2
)
Layout.preferredH
eight
:
dialogComponentLoader
.
height
+
_contentMargin
id
:
marginI
tem
w
idth
:
dialogComponentLoader
.
width
+
(
_contentMargin
*
2
)
h
eight
:
dialogComponentLoader
.
height
+
_contentMargin
Loader
{
id
:
dialogComponentLoader
...
...
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