Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/DiscoverWindow.qml
1 | import QtQuick 2.5 | 1 | import QtQuick 2.5 | ||
---|---|---|---|---|---|
2 | import QtQuick.Layouts 1.1 | 2 | import QtQuick.Layouts 1.1 | ||
3 | import QtQuick.Controls 1.1 | 3 | import QtQuick.Controls 1.1 | ||
4 | import QtQuick.Controls 2.1 as QQC2 | 4 | import QtQuick.Controls 2.1 as QQC2 | ||
5 | import org.kde.discover 2.0 | 5 | import org.kde.discover 2.0 | ||
6 | import org.kde.discover.app 1.0 | 6 | import org.kde.discover.app 1.0 | ||
7 | import org.kde.kirigami 2.0 as Kirigami | 7 | import org.kde.kirigami 2.2 as Kirigami | ||
8 | import "navigation.js" as Navigation | 8 | import "navigation.js" as Navigation | ||
9 | 9 | | |||
10 | Kirigami.ApplicationWindow | 10 | Kirigami.ApplicationWindow | ||
11 | { | 11 | { | ||
12 | id: window | 12 | id: window | ||
13 | readonly property string applicationListComp: ("qrc:/qml/ApplicationsListPage.qml") | 13 | readonly property string applicationListComp: ("qrc:/qml/ApplicationsListPage.qml") | ||
14 | readonly property string applicationComp: ("qrc:/qml/ApplicationPage.qml") | 14 | readonly property string applicationComp: ("qrc:/qml/ApplicationPage.qml") | ||
15 | readonly property string reviewsComp: ("qrc:/qml/ReviewsPage.qml") | 15 | readonly property string reviewsComp: ("qrc:/qml/ReviewsPage.qml") | ||
16 | 16 | | |||
17 | //toplevels | 17 | //toplevels | ||
18 | readonly property string topBrowsingComp: ("qrc:/qml/BrowsingPage.qml") | 18 | readonly property string topBrowsingComp: ("qrc:/qml/BrowsingPage.qml") | ||
19 | readonly property string topInstalledComp: ("qrc:/qml/InstalledPage.qml") | 19 | readonly property string topInstalledComp: ("qrc:/qml/InstalledPage.qml") | ||
20 | readonly property string topSearchComp: ("qrc:/qml/SearchPage.qml") | 20 | readonly property string topSearchComp: ("qrc:/qml/SearchPage.qml") | ||
21 | readonly property string topUpdateComp: ("qrc:/qml/UpdatesPage.qml") | 21 | readonly property string topUpdateComp: ("qrc:/qml/UpdatesPage.qml") | ||
22 | readonly property string topSourcesComp: ("qrc:/qml/SourcesPage.qml") | 22 | readonly property string topSourcesComp: ("qrc:/qml/SourcesPage.qml") | ||
23 | readonly property string loadingComponent: ("qrc:/qml/LoadingPage.qml") | 23 | readonly property string loadingComponent: ("qrc:/qml/LoadingPage.qml") | ||
24 | readonly property QtObject stack: window.pageStack | 24 | readonly property QtObject stack: window.pageStack | ||
25 | property string currentTopLevel: defaultStartup ? topBrowsingComp : loadingComponent | 25 | property string currentTopLevel: defaultStartup ? topBrowsingComp : loadingComponent | ||
26 | property bool defaultStartup: true | 26 | property bool defaultStartup: true | ||
27 | 27 | | |||
28 | objectName: "DiscoverMainWindow" | 28 | objectName: "DiscoverMainWindow" | ||
29 | title: leftPage ? leftPage.title : "" | 29 | title: leftPage ? leftPage.title : "" | ||
30 | 30 | | |||
31 | header: null | 31 | header: Kirigami.ToolBarApplicationHeader {} | ||
32 | // header: (window.wideScreen ? desktopHeader : mobileHeader).createObject() | ||||
33 | // | ||||
34 | // Component { id: desktopHeader; Kirigami.ToolBarApplicationHeader {} } | ||||
35 | // Component { id: mobileHeader; Kirigami.ApplicationHeader {} } | ||||
36 | | ||||
32 | visible: true | 37 | visible: true | ||
33 | 38 | | |||
34 | minimumWidth: 300 | 39 | minimumWidth: 300 | ||
35 | minimumHeight: 300 | 40 | minimumHeight: 300 | ||
36 | 41 | | |||
37 | pageStack.defaultColumnWidth: Kirigami.Units.gridUnit * 25 | 42 | pageStack.defaultColumnWidth: Kirigami.Units.gridUnit * 25 | ||
38 | 43 | | |||
39 | readonly property var leftPage: window.stack.depth>0 ? window.stack.get(0) : null | 44 | readonly property var leftPage: window.stack.depth>0 ? window.stack.get(0) : null | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |