1
0
Fork 0

Launcher: nicer back button.

Avoid localisation issues for the back button, by switching to an 
icon.
This commit is contained in:
Automatic Release Builder 2020-10-29 11:47:47 +00:00 committed by James Turner
parent 9855e89109
commit f8aea84541
8 changed files with 40 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -173,11 +173,9 @@ Rectangle {
text: " "
}
Button
BackButton
{
width: Style.strutSize
id: backButton
text: "< Back"
onClicked: root.goBack();
}

View file

@ -38,9 +38,14 @@ Rectangle {
spacing: Style.margin
anchors.horizontalCenter: parent.horizontalCenter
Item { // top padding
width: parent.width
height: Style.margin
}
AircraftVariantChoice {
id: headingBox
fontPixelSize: 30
fontPixelSize: Style.headingFontPixelSize * 2
popupFontPixelSize: Style.headingFontPixelSize
anchors {

View file

@ -352,11 +352,9 @@ FocusScope
anchors.fill: parent
visible: false
Button {
anchors { left: parent.left; top: parent.top; margins: Style.margin }
width: Style.strutSize
BackButton {
id: backButton
text: "< Back"
anchors { left: parent.left; top: parent.top; margins: Style.margin }
onClicked: root.goBack();
}
}

View file

@ -0,0 +1,27 @@
import QtQuick 2.4
import "."
Item {
id: root
signal clicked
property bool enabled: true
width: image.width + Style.margin
height: image.height + Style.margin
Image {
id: image
anchors.centerIn: parent
source: "qrc:///back-icon"
}
MouseArea {
id: mouse
hoverEnabled: true
anchors.fill: parent
onClicked: {
root.clicked();
}
}
}

View file

@ -481,12 +481,10 @@ Item {
}
}
Button {
BackButton {
id: backButton
anchors { left: parent.left; top: parent.top; margins: Style.margin }
width: Style.strutSize
visible: detailLoader.visible
text: "< Back"
onClicked: {
detailLoader.sourceComponent = null
}

View file

@ -323,13 +323,10 @@ Item {
}
}
Button {
BackButton {
id: backButton
anchors { left: parent.left; top: parent.top; margins: Style.margin }
width: Style.strutSize
visible: detailLoader.visible
text: qsTr("< Back")
onClicked: root.backToSearch();
}
}

View file

@ -29,6 +29,7 @@
<file alias="toolbox-summary">assets/toolbox-summary.png</file>
<file alias="toolbox-addons">assets/toolbox-addons.png</file>
<file alias="toolbox-help">assets/toolbox-help.png</file>
<file alias="back-icon">assets/icons8-back-arrow-50.png</file>
<file>qml/AircraftList.qml</file>
<file>qml/AircraftRating.qml</file>
<file>qml/ArrowButton.qml</file>
@ -141,7 +142,7 @@
<file>qml/NewVersionNotification.qml</file>
<file>qml/DidMigrateOfficialCatalogNotification.qml</file>
<file>qml/DidMigrateOtherCatalogNotification.qml</file>
<file>qml/BackButton.qml</file>
</qresource>
<qresource prefix="/preview">
<file alias="close-icon">assets/preview-close.png</file>