Debian Codegraph @

src/GUI/qml/NoDefaultCatalogPanel.qml

raw
1 // SPDX-FileCopyrightText: 2018 James Turner
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 import QtQuick 2.2
5 import FlightGear.Launcher 1.0 as FG
6
7 Item {
8 id: root
9
10 height: frameRect.height + (Style.margin * 2);
11 z: 100
12
13 Rectangle {
14 id: frameRect
15 y: Style.margin
16 height: noDefaultCatalogRow.childrenRect.height + (Style.margin * 2);
17 width: parent.width
18 color: "white"
19 border.width: 1
20 border.color: Style.minorFrameColor
21
22 Row {
23 y: Style.margin
24 x: Style.margin
25
26 id: noDefaultCatalogRow
27 spacing: Style.margin
28
29 StyledText {
30 text: qsTr("The official FlightGear aircraft hangar is not added, so many standard "
31 + "aircraft will not be available. You can add the hangar now, or hide "
32 + "this message. The official hangar can always be restored from the 'Add-Ons' page.")
33 wrapMode: Text.WordWrap
34 anchors.verticalCenter: parent.verticalCenter
35 width: root.width - (addDefaultButton.width + hideButton.width + Style.margin * 3)
36 }
37
38 Button {
39 id: addDefaultButton
40 text: _addOns.catalogs.isAddingCatalog ? qsTr("Adding hangar")
41 : qsTr("Add default hangar")
42 anchors.verticalCenter: parent.verticalCenter
43 onClicked: _addOns.officialCatalogAction("add-official");
44 enabled: !_addOns.catalogs.isAddingCatalog
45 }
46
47 Button {
48 id: hideButton
49 text: qsTr("Hide")
50 anchors.verticalCenter: parent.verticalCenter
51 onClicked: _addOns.officialCatalogAction("hide");
52 }
53 } // content row
54 } // visible frame
55 } // root item