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
167813ba
Commit
167813ba
authored
Apr 16, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Map slider tweaks.
parent
fbe19144
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
43 deletions
+41
-43
QGCMapBackground.qml
src/ui/qmlcommon/QGCMapBackground.qml
+3
-2
QGCSlider.qml
src/ui/qmlcommon/QGCSlider.qml
+38
-41
No files found.
src/ui/qmlcommon/QGCMapBackground.qml
View file @
167813ba
...
...
@@ -179,13 +179,14 @@ Rectangle {
Item
{
id
:
scale
parent
:
zoomSlider
.
parent
visible
:
scaleText
.
text
!=
"
0 m
"
visible
:
scaleText
.
text
!=
=
"
0 m
"
z
:
map
.
z
+
2
opacity
:
1
anchors
{
bottom
:
zoomSlider
.
top
;
bottomMargin
:
8
;
left
:
zoomSlider
.
left
leftMargin
:
4
}
Image
{
id
:
scaleImageLeft
...
...
@@ -212,7 +213,7 @@ Rectangle {
horizontalAlignment
:
Text
.
AlignHCenter
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.bottomMargin
:
8
anchors.bottomMargin
:
10
text
:
"
0 m
"
}
Component.onCompleted
:
{
...
...
src/ui/qmlcommon/QGCSlider.qml
View file @
167813ba
...
...
@@ -43,74 +43,71 @@ import QGroundControl.Controls 1.0
Item
{
id
:
slider
;
height
:
1
0
height
:
1
2
property
real
value
// value is read/write.
property
real
minimum
:
0
property
real
maximum
:
1
property
int
length
:
width
-
handle
.
width
Rectangle
{
anchors.fill
:
parent
border.width
:
1
;
border.color
:
"
lightgrey
"
radius
:
8
color
:
"
white
"
opacity
:
1
anchors.fill
:
parent
radius
:
6
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
);
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.leftMargin
:
4
anchors.top
:
parent
.
top
anchors.topMargin
:
(
parent
.
height
-
height
)
/
2
height
:
3
width
:
handle
.
x
-
x
color
:
"
#1c94fc
"
radius
:
4
height
:
4
width
:
handle
.
x
-
x
color
:
"
#69bb17
"
anchors.verticalCenter
:
parent
.
verticalCenter
}
Rectangle
{
id
:
labelRect
width
:
label
.
width
height
:
label
.
height
+
4
radius
:
4
smooth
:
true
color
:
"
white
"
border.color
:
"
lightgrey
"
anchors.bottom
:
handle
.
top
id
:
labelRect
width
:
label
.
width
height
:
label
.
height
+
4
radius
:
4
smooth
:
true
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.75
);
border.color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.45
);
anchors.bottom
:
handle
.
top
anchors.bottomMargin
:
4
x
:
Math
.
max
(
Math
.
min
(
handle
.
x
+
(
handle
.
width
-
width
)
/
2
,
slider
.
width
-
width
),
0
)
visible
:
mouseRegion
.
pressed
x
:
Math
.
max
(
Math
.
min
(
handle
.
x
+
(
handle
.
width
-
width
)
/
2
,
slider
.
width
-
width
),
0
)
QGCLabel
{
id
:
label
color
:
"
darkgrey
"
text
:
slider
.
value
.
toFixed
(
2
)
width
:
font
.
pointSize
*
3.5
anchors.horizontalCenter
:
labelRect
.
horizontalCenter
horizontalAlignment
:
Text
.
AlignHCenter
anchors.
baseline
:
parent
.
bottom
anchors.baselineOffset
:
-
6
font.pixelSize
:
14
id
:
label
color
:
"
black
"
text
:
slider
.
value
.
toFixed
(
2
)
width
:
font
.
pointSize
*
3.5
anchors.horizontalCenter
:
labelRect
.
horizontalCenter
horizontalAlignment
:
Text
.
AlignHCenter
anchors.
verticalCenter
:
labelRect
.
verticalCenter
//anchors.baseline: parent.bottom
//anchors.baselineOffset: -6
}
}
Rectangle
{
id
:
handle
;
smooth
:
true
width
:
26
;
y
:
(
slider
.
height
-
height
)
/
2
;
x
:
(
slider
.
value
-
slider
.
minimum
)
*
slider
.
length
/
(
slider
.
maximum
-
slider
.
minimum
)
id
:
handle
;
smooth
:
true
width
:
26
;
y
:
(
slider
.
height
-
height
)
/
2
;
x
:
(
slider
.
value
-
slider
.
minimum
)
*
slider
.
length
/
(
slider
.
maximum
-
slider
.
minimum
)
height
:
width
;
radius
:
width
/
2
gradient
:
normalGradient
height
:
width
radius
:
width
/
2
gradient
:
normalGradient
border.width
:
2
border.color
:
"
white
"
Gradient
{
id
:
normalGradient
GradientStop
{
position
:
0.0
;
color
:
"
#b0b0b0
"
}
GradientStop
{
position
:
0.0
;
color
:
"
#b0b0b0
"
}
GradientStop
{
position
:
0.66
;
color
:
"
#909090
"
}
GradientStop
{
position
:
1.0
;
color
:
"
#545454
"
}
GradientStop
{
position
:
1.0
;
color
:
"
#545454
"
}
}
MouseArea
{
...
...
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