Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/ApplicationPage.qml
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 79 | onClicked: if(index>=0) { | |||
---|---|---|---|---|---|
81 | console.assert(res) | 81 | console.assert(res) | ||
82 | window.stack.pop() | 82 | window.stack.pop() | ||
83 | Navigation.openApplication(res) | 83 | Navigation.openApplication(res) | ||
84 | } | 84 | } | ||
85 | } | 85 | } | ||
86 | } | 86 | } | ||
87 | } | 87 | } | ||
88 | 88 | | |||
89 | header: QQC2.ToolBar { | 89 | actions { | ||
90 | anchors { | 90 | main: appbutton.action | ||
91 | right: parent.right | 91 | right: Kirigami.Action { | ||
92 | left: parent.left | 92 | visible: application.isInstalled && application.canExecute | ||
93 | } | 93 | text: application.executeLabel | ||
94 | 94 | icon.name: "media-playback-start" | |||
95 | contentItem: RowLayout { | 95 | onTriggered: application.invokeApplication() | ||
96 | spacing: Kirigami.Units.smallSpacing | | |||
97 | | ||||
98 | ToolButton { | | |||
99 | Layout.leftMargin: Kirigami.Units.smallSpacing | | |||
100 | iconName: "draw-arrow-back" | | |||
101 | tooltip: i18n("Back") | | |||
102 | enabled: appInfo.sClose.enabled | | |||
103 | onClicked: appInfo.sClose.activated() | | |||
104 | } | | |||
105 | Item { | | |||
106 | Layout.fillWidth: true | | |||
107 | } | | |||
108 | Kirigami.Heading { | | |||
109 | level: 3 | | |||
110 | Layout.maximumWidth: parent.width/2 | | |||
111 | text: appInfo.application.name | | |||
112 | maximumLineCount: 1 | | |||
113 | elide: Text.ElideRight | | |||
114 | horizontalAlignment: Text.AlignHCenter | | |||
115 | } | | |||
116 | Item { | | |||
117 | Layout.fillWidth: true | | |||
118 | } | 96 | } | ||
119 | | ||||
120 | Binding { | | |||
121 | target: appInfo.actions | | |||
122 | property: "main" | | |||
123 | value: appbutton.action | | |||
124 | } | 97 | } | ||
125 | 98 | | |||
126 | InstallApplicationButton { | 99 | InstallApplicationButton { | ||
127 | id: appbutton | 100 | id: appbutton | ||
128 | Layout.rightMargin: Kirigami.Units.smallSpacing | 101 | Layout.rightMargin: Kirigami.Units.smallSpacing | ||
129 | application: appInfo.application | 102 | application: appInfo.application | ||
130 | visible: applicationWindow().wideScreen | 103 | visible: false | ||
131 | } | | |||
132 | | ||||
133 | Button { | | |||
134 | Layout.rightMargin: Kirigami.Units.smallSpacing | | |||
135 | visible: application.isInstalled && application.canExecute | | |||
136 | text: application.executeLabel | | |||
137 | onClicked: application.invokeApplication() | | |||
138 | } | | |||
139 | } | | |||
140 | } | 104 | } | ||
141 | 105 | | |||
142 | leftPadding: Kirigami.Units.largeSpacing * (applicationWindow().wideScreen ? 2 : 1) | 106 | leftPadding: Kirigami.Units.largeSpacing * (applicationWindow().wideScreen ? 2 : 1) | ||
143 | rightPadding: Kirigami.Units.largeSpacing * (applicationWindow().wideScreen ? 2 : 1) | 107 | rightPadding: Kirigami.Units.largeSpacing * (applicationWindow().wideScreen ? 2 : 1) | ||
144 | // Icon, name, caption, screenshots, description and reviews | 108 | // Icon, name, caption, screenshots, description and reviews | ||
145 | ColumnLayout { | 109 | ColumnLayout { | ||
146 | spacing: 0 | 110 | spacing: 0 | ||
147 | RowLayout { | 111 | RowLayout { | ||
148 | Kirigami.Icon { | 112 | Kirigami.Icon { | ||
149 | Layout.topMargin: Kirigami.Units.smallSpacing * 2 | | |||
150 | Layout.preferredHeight: 80 | 113 | Layout.preferredHeight: 80 | ||
151 | Layout.preferredWidth: 80 | 114 | Layout.preferredWidth: 80 | ||
152 | source: appInfo.application.icon | 115 | source: appInfo.application.icon | ||
153 | Layout.rightMargin: Kirigami.Units.smallSpacing * 2 | 116 | Layout.rightMargin: Kirigami.Units.smallSpacing * 2 | ||
154 | } | 117 | } | ||
155 | ColumnLayout { | 118 | ColumnLayout { | ||
156 | spacing: 0 | 119 | spacing: 0 | ||
157 | Kirigami.Heading { | 120 | Kirigami.Heading { | ||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |