| 1 |
import QtQuick 2.4 |
| 2 |
import QtQuick.Controls 2.2 as QQC |
| 3 |
|
| 4 |
import FlightGear 1.0 |
| 5 |
import FlightGear.Launcher 1.0 |
| 6 |
|
| 7 |
Item { |
| 8 |
id: root |
| 9 |
|
| 10 |
Rectangle { |
| 11 |
id: content |
| 12 |
color: Style.themeColor |
| 13 |
anchors.fill: parent |
| 14 |
|
| 15 |
} |
| 16 |
|
| 17 |
Flickable { |
| 18 |
id: flick |
| 19 |
|
| 20 |
contentHeight: textColumn.childrenRect.height + imageClipFrame.height + (Style.strutSize * 2) |
| 21 |
flickableDirection: Flickable.VerticalFlick |
| 22 |
|
| 23 |
QQC.ScrollBar.vertical: QQC.ScrollBar {} |
| 24 |
|
| 25 |
anchors.fill: parent |
| 26 |
|
| 27 |
|
| 28 |
Item { |
| 29 |
id: imageClipFrame |
| 30 |
clip: true |
| 31 |
|
| 32 |
height: root.height * 0.5 |
| 33 |
anchors { |
| 34 |
left: parent.left |
| 35 |
right: parent.right |
| 36 |
top: parent.top |
| 37 |
} |
| 38 |
|
| 39 |
PreviewImage { |
| 40 |
id: preview |
| 41 |
|
| 42 |
anchors.centerIn: parent |
| 43 |
|
| 44 |
// over-zoom the preview to fill the entire space available |
| 45 |
readonly property double scale: Math.max(root.width / sourceSize.width, |
| 46 |
imageClipFrame.height / sourceSize.height) |
| 47 |
|
| 48 |
width: height * aspectRatio |
| 49 |
height: scale * sourceSize.height |
| 50 |
|
| 51 |
property var urlsList: _launcher.defaultSplashUrls() |
| 52 |
imageUrl: urlsList[0] |
| 53 |
} |
| 54 |
|
| 55 |
Text { |
| 56 |
id: logoText |
| 57 |
width: parent.width - Style.strutSize |
| 58 |
|
| 59 |
anchors { |
| 60 |
top: parent.top |
| 61 |
topMargin: Style.strutSize |
| 62 |
} |
| 63 |
|
| 64 |
font.pointSize: Style.strutSize * 3 |
| 65 |
font.italic: true |
| 66 |
font.bold: true |
| 67 |
|
| 68 |
horizontalAlignment: Text.AlignHCenter |
| 69 |
fontSizeMode: Text.Fit |
| 70 |
text: "FlightGear " + _launcher.versionString |
| 71 |
color: "white" |
| 72 |
style: Text.Outline |
| 73 |
styleColor: "black" |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
Column { |
| 80 |
id: textColumn |
| 81 |
anchors { |
| 82 |
left: parent.left |
| 83 |
right: parent.right |
| 84 |
top: imageClipFrame.bottom |
| 85 |
|
| 86 |
margins: Style.strutSize |
| 87 |
} |
| 88 |
|
| 89 |
spacing: Style.strutSize |
| 90 |
|
| 91 |
Text { |
| 92 |
width: parent.width |
| 93 |
font.pixelSize: Style.baseFontPixelSize * 1.5 |
| 94 |
color: "white" |
| 95 |
wrapMode: Text.WordWrap |
| 96 |
|
| 97 |
readonly property string forumLink: "href=\"https://forum.flightgear.org\""; |
| 98 |
|
| 99 |
text: qsTr("Welcome to FlightGear, the open source flight simulator. " + |
| 100 |
"This software is the work of volunteers. We hope you enjoy it. " + |
| 101 |
"If you find problems or would like to contribute, " + |
| 102 |
"please <a %1>visit our forum</a>.").arg(forumLink) |
| 103 |
|
| 104 |
onLinkActivated: { |
| 105 |
Qt.openUrlExternally(link) |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
Text { |
| 110 |
width: parent.width |
| 111 |
font.pixelSize: Style.baseFontPixelSize * 1.5 |
| 112 |
color: "white" |
| 113 |
wrapMode: Text.WordWrap |
| 114 |
|
| 115 |
readonly property string gplLink: "href=\"https://www.gnu.org/licenses/gpl-3.0.html\""; |
| 116 |
|
| 117 |
text: qsTr("FlightGear is Free software, licensed under the <a %1>GNU General Public License</a>. " + |
| 118 |
"You are free to use, customize and fix the software; and share your changes with the community.").arg(gplLink) |
| 119 |
|
| 120 |
onLinkActivated: { |
| 121 |
Qt.openUrlExternally(link) |
| 122 |
} |
| 123 |
} |
| 124 |
|
| 125 |
Text { |
| 126 |
width: parent.width |
| 127 |
font.pixelSize: Style.baseFontPixelSize * 1.5 |
| 128 |
color: "white" |
| 129 |
|
| 130 |
wrapMode: Text.WordWrap |
| 131 |
|
| 132 |
text: qsTr("FlightGear will automatically download scenery as you fly. " + |
| 133 |
"Downloaded scenery is stored on your computer. " + |
| 134 |
"The scenery can occupy a large amount of storage space. " + |
| 135 |
"If you prefer to download scenery manually, please turn off the 'Download scenery automatically' option." |
| 136 |
) |
| 137 |
} |
| 138 |
|
| 139 |
|
| 140 |
Text { |
| 141 |
width: parent.width |
| 142 |
font.pixelSize: Style.baseFontPixelSize * 1.5 |
| 143 |
color: "white" |
| 144 |
wrapMode: Text.WordWrap |
| 145 |
|
| 146 |
text: qsTr("FlightGear can automatically report crashes and errors to the development team, " + |
| 147 |
"which helps to improve the software for everyone. This reporting is anonymous but " + |
| 148 |
"contains information such as the aircraft in use, your operating system and graphics driver. " + |
| 149 |
"You can enable or disable this reporting in the 'Settings' page." |
| 150 |
) |
| 151 |
} |
| 152 |
|
| 153 |
Item { |
| 154 |
width: parent.width |
| 155 |
height: childrenRect.height |
| 156 |
|
| 157 |
Button { |
| 158 |
invertColor: true |
| 159 |
text: qsTr("Okay"); |
| 160 |
anchors.right: parent.right |
| 161 |
|
| 162 |
onClicked: { |
| 163 |
OverlayShared.globalOverlay.dismissOverlay(); |
| 164 |
} |
| 165 |
} |
| 166 |
} |
| 167 |
} // of column |
| 168 |
|
| 169 |
} // of Flickable |
| 170 |
|
| 171 |
ScrollToBottomHint { |
| 172 |
anchors.right: parent.right |
| 173 |
anchors.bottom: parent.bottom |
| 174 |
anchors.margins: Style.strutSize |
| 175 |
|
| 176 |
atTheBottom: flick.contentY >= (flick.contentHeight - flick.height) |
| 177 |
timeout: 10 * 1000 |
| 178 |
} |
| 179 |
} // of Item |