1
0
Fork 0

Launcher: center selection highlight in aircraft selection

This commit is contained in:
Simon 2023-06-14 18:13:14 +02:00 committed by James Turner
parent 6df2904f75
commit 01fb8faf3e
2 changed files with 9 additions and 3 deletions

View file

@ -9,7 +9,7 @@ Item {
signal showDetails(var uri) signal showDetails(var uri)
implicitHeight: Math.max(contentBox.childrenRect.height, thumbnailBox.height) + implicitHeight: Math.max(contentBox.childrenRect.height, thumbnailBox.height) +
footer.height footer.height + Style.margin / 2
implicitWidth: ListView.view.width implicitWidth: ListView.view.width
readonly property bool __isSelected: (_launcher.selectedAircraft === model.uri) readonly property bool __isSelected: (_launcher.selectedAircraft === model.uri)
@ -47,6 +47,8 @@ Item {
id: thumbnailBox id: thumbnailBox
width: 172 width: 172
height: 128 height: 128
anchors.top: parent.top
anchors.topMargin: Style.margin / 2
Rectangle { Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
@ -72,6 +74,7 @@ Item {
right: parent.right right: parent.right
leftMargin: Style.margin leftMargin: Style.margin
rightMargin: Style.margin rightMargin: Style.margin
topMargin: Style.margin / 2
top: parent.top top: parent.top
} }
@ -157,7 +160,7 @@ Item {
Item { Item {
id: footer id: footer
height: Style.margin height: Style.margin / 2 + 1
width: parent.width width: parent.width
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -165,7 +168,8 @@ Item {
color: Style.frameColor color: Style.frameColor
height: 1 height: 1
width: parent.width - Style.strutSize width: parent.width - Style.strutSize
anchors.centerIn: parent anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
} }
} }
} // of root item } // of root item

View file

@ -65,6 +65,8 @@ Item {
onShowDetails: root.showDetails(uri) onShowDetails: root.showDetails(uri)
} }
spacing: 0
clip: true clip: true
focus: true focus: true