Commit a4248679 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4952 from DonLakeFlyer/Binding

Fix binding loops in MissionItemIndexLabel
parents b8c17cdb 967f0e94
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
...@@ -68,32 +67,28 @@ Canvas { ...@@ -68,32 +67,28 @@ Canvas {
} }
Rectangle { Rectangle {
id: labelControl id: labelControl
anchors.leftMargin: -_labelMargin anchors.leftMargin: -((_labelMargin * 2) + indicator.width)
anchors.topMargin: -_labelMargin anchors.rightMargin: -(_labelMargin * 2)
anchors.left: indicator.left anchors.fill: labelControlLabel
anchors.top: indicator.top color: "white"
height: _labelRadius * 2 opacity: 0.5
width: labelControlLabel.contentWidth + (_labelMargin * 3) + indicator.width radius: _labelRadius
color: "white" visible: _label.length !== 0
opacity: 0.5
radius: _labelRadius
visible: _label.length !== 0
} }
QGCLabel { QGCLabel {
id: labelControlLabel id: labelControlLabel
anchors.leftMargin: indicator.width + _labelMargin anchors.topMargin: -_labelMargin
anchors.left: labelControl.left anchors.bottomMargin: -_labelMargin
anchors.rightMargin: _labelMargin anchors.leftMargin: _labelMargin
anchors.right: labelControl.right anchors.left: indicator.right
anchors.top: labelControl.top anchors.top: indicator.top
anchors.bottom: labelControl.bottom anchors.bottom: indicator.bottom
verticalAlignment: Text.AlignVCenter
color: "white" color: "white"
font.pointSize: ScreenTools.defaultFontPointSize
fontSizeMode: Text.HorizontalFit
text: _label text: _label
verticalAlignment: Text.AlignVCenter
visible: labelControl.visible
} }
Rectangle { Rectangle {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment