Skip to content

Commit

Permalink
fix: remove spacing and add margin instead
Browse files Browse the repository at this point in the history
If not, the spacing of the hidden vehicles will still take up space
  • Loading branch information
Fredrikbjornland committed Oct 28, 2024
1 parent 12e3614 commit 419f69c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ui/toolbar/ADSBVehicleIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Item {
QGCListView {
id: hiddenVehiclesList
anchors.margins: ScreenTools.defaultFontPixelHeight
spacing: ScreenTools.defaultFontPixelHeight / 2
clip: true
Layout.fillWidth: true

Expand All @@ -83,9 +82,10 @@ Item {
model: adsbManager.adsbVehicles

delegate: Item {
height: object.hidden ? adsbVehicleLabel.implicitHeight : 0
width: hiddenVehiclesList.width
visible: object.hidden
height: object.hidden ? adsbVehicleLabel.implicitHeight : 0
width: hiddenVehiclesList.width
visible: object.hidden
anchors.margins: ScreenTools.defaultFontPixelHeight

MouseArea {
anchors.fill: parent
Expand Down Expand Up @@ -117,7 +117,8 @@ Item {
}

QGCButton {
text: qsTr("Unhide all")
text: qsTr("Unhide all")
anchors.margins: ScreenTools.defaultFontPixelHeight
onClicked: {
adsbManager.unhideAllVehicles()
}
Expand Down

0 comments on commit 419f69c

Please sign in to comment.