on 73aedc0 help sign in
unity8/qml/Components/KeyboardShortcutsOverlay.qml
334 lines 12 kB history raw
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
17import QtQuick 2.4
18import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.3
21Rectangle {
22 id: root
23 width: topLayout.childrenRect.width + topLayout.anchors.leftMargin + topLayout.anchors.rightMargin
24 height: topLayout.childrenRect.height + topLayout.anchors.topMargin + topLayout.anchors.bottomMargin
25 color: theme.palette.normal.background
26 radius: units.gu(.5)
28 readonly property int maxTextSize: (root.parent.width / 4) - padding
29 readonly property int padding: units.gu(4)
31 Item { // dummy container to break binding loops *and* keep the margins in topLayout working
32 GridLayout {
33 id: topLayout
34 anchors.fill: parent
35 anchors.margins: padding
36 columns: 2
37 columnSpacing: padding
39 Label {
40 Layout.columnSpan: 2
41 text: i18n.tr("Keyboard Shortcuts")
42 fontSize: "large"
43 font.weight: Font.Light
44 lineHeight: 1.6
45 }
47 GridLayout {
48 columns: 2
49 columnSpacing: units.gu(4)
50 Layout.alignment: Qt.AlignTop
52 // Unity 8 section
53 Label {
54 Layout.columnSpan: 2
55 text: i18n.tr("Unity 8")
56 font.weight: Font.Light
57 color: theme.palette.normal.baseText
58 lineHeight: 1.3
59 }
61 Label {
62 text: i18n.tr("PrtScr")
63 fontSize: "small"
64 font.weight: Font.Medium
65 }
66 Label {
67 text: i18n.tr("Takes a screenshot.")
68 fontSize: "small"
69 font.weight: Font.Light
70 wrapMode: Text.Wrap
71 Layout.maximumWidth: maxTextSize
72 }
74 Label {
75 text: i18n.tr("Alt + PrtScr")
76 fontSize: "small"
77 font.weight: Font.Medium
78 }
79 Label {
80 text: i18n.tr("Takes a screenshot of a window.")
81 fontSize: "small"
82 font.weight: Font.Light
83 wrapMode: Text.Wrap
84 Layout.maximumWidth: maxTextSize
85 }
87 Label {
88 text: i18n.tr("Super + Space")
89 fontSize: "small"
90 font.weight: Font.Medium
91 }
92 Label {
93 text: i18n.tr("Switches to next keyboard layout.")
94 fontSize: "small"
95 font.weight: Font.Light
96 wrapMode: Text.Wrap
97 Layout.maximumWidth: maxTextSize
98 }
100 Label {
101 text: i18n.tr("Super + Shift + Space")
102 fontSize: "small"
103 font.weight: Font.Medium
104 }
105 Label {
106 text: i18n.tr("Switches to previous keyboard layout.")
107 fontSize: "small"
108 font.weight: Font.Light
109 wrapMode: Text.Wrap
110 Layout.maximumWidth: maxTextSize
111 }
114 // Launcher section
115 Item { Layout.columnSpan: 2; height: units.gu(2) }
116 Label {
117 Layout.columnSpan: 2
118 text: i18n.tr("Launcher")
119 font.weight: Font.Light
120 color: theme.palette.normal.baseText
121 lineHeight: 1.3
122 }
124 Label {
125 text: i18n.tr("Super (Hold)")
126 fontSize: "small"
127 font.weight: Font.Medium
128 }
129 Label {
130 text: i18n.tr("Opens the launcher, displays shortcuts.")
131 fontSize: "small"
132 font.weight: Font.Light
133 wrapMode: Text.Wrap
134 Layout.maximumWidth: maxTextSize
135 }
137 Label {
138 text: i18n.tr("Alt + F1")
139 fontSize: "small"
140 font.weight: Font.Medium
141 }
142 Label {
143 text: i18n.tr("Opens launcher keyboard navigation mode.")
144 fontSize: "small"
145 font.weight: Font.Light
146 wrapMode: Text.Wrap
147 Layout.maximumWidth: maxTextSize
148 }
150 Label {
151 text: i18n.tr("Super + Tab")
152 fontSize: "small"
153 font.weight: Font.Medium
154 }
155 Label {
156 text: i18n.tr("Switches applications via the launcher.")
157 fontSize: "small"
158 font.weight: Font.Light
159 wrapMode: Text.Wrap
160 Layout.maximumWidth: maxTextSize
161 }
163 Label {
164 text: i18n.tr("Super + 0 to 9")
165 fontSize: "small"
166 font.weight: Font.Medium
167 }
168 Label {
169 text: i18n.tr("Same as clicking on a launcher icon.")
170 fontSize: "small"
171 font.weight: Font.Light
172 wrapMode: Text.Wrap
173 Layout.maximumWidth: maxTextSize
174 }
177 // Scopes section
178 Item { Layout.columnSpan: 2; height: units.gu(2) }
179 Label {
180 Layout.columnSpan: 2
181 text: i18n.tr("Scopes")
182 font.weight: Font.Light
183 color: theme.palette.normal.baseText
184 lineHeight: 1.3
185 }
187 Label {
188 text: i18n.tr("Super (Tap)")
189 fontSize: "small"
190 font.weight: Font.Medium
191 }
192 Label {
193 text: i18n.tr("Opens the Scopes home.")
194 fontSize: "small"
195 font.weight: Font.Light
196 wrapMode: Text.Wrap
197 Layout.maximumWidth: maxTextSize
198 }
199 }
201 GridLayout {
202 columns: 2
203 columnSpacing: padding
204 Layout.alignment: Qt.AlignTop
206 // Switching section
207 Label {
208 Layout.columnSpan: 2
209 text: i18n.tr("Switching")
210 font.weight: Font.Light
211 color: theme.palette.normal.baseText
212 lineHeight: 1.3
213 }
215 Label {
216 text: i18n.tr("Alt + Tab")
217 fontSize: "small"
218 font.weight: Font.Medium
219 }
220 Label {
221 text: i18n.tr("Switches between applications.")
222 fontSize: "small"
223 font.weight: Font.Light
224 wrapMode: Text.Wrap
225 Layout.maximumWidth: maxTextSize
226 }
228 Label {
229 text: i18n.tr("Super + W")
230 fontSize: "small"
231 font.weight: Font.Medium
232 }
233 Label {
234 text: i18n.tr("Opens the desktop spread.")
235 fontSize: "small"
236 font.weight: Font.Light
237 wrapMode: Text.Wrap
238 Layout.maximumWidth: maxTextSize
239 }
241 Label {
242 text: i18n.tr("Cursor Left or Right")
243 fontSize: "small"
244 font.weight: Font.Medium
245 }
246 Label {
247 text: i18n.tr("Moves the focus.")
248 fontSize: "small"
249 font.weight: Font.Light
250 wrapMode: Text.Wrap
251 Layout.maximumWidth: maxTextSize
252 }
255 // Windows section
256 Item { Layout.columnSpan: 2; height: units.gu(2) }
257 Label {
258 Layout.columnSpan: 2
259 text: i18n.tr("Windows")
260 font.weight: Font.Light
261 color: theme.palette.normal.baseText
262 lineHeight: 1.3
263 }
265 Label {
266 text: i18n.tr("Ctrl + Super + D")
267 fontSize: "small"
268 font.weight: Font.Medium
269 }
270 Label {
271 text: i18n.tr("Minimizes all windows.")
272 fontSize: "small"
273 font.weight: Font.Light
274 wrapMode: Text.Wrap
275 Layout.maximumWidth: maxTextSize
276 }
278 Label {
279 text: i18n.tr("Ctrl + Super + Up")
280 fontSize: "small"
281 font.weight: Font.Medium
282 }
283 Label {
284 text: i18n.tr("Maximizes the current window.")
285 fontSize: "small"
286 font.weight: Font.Light
287 wrapMode: Text.Wrap
288 Layout.maximumWidth: maxTextSize
289 }
291 Label {
292 text: i18n.tr("Ctrl + Super + Down")
293 fontSize: "small"
294 font.weight: Font.Medium
295 }
296 Label {
297 text: i18n.tr("Minimizes or restores the current window.")
298 fontSize: "small"
299 font.weight: Font.Light
300 wrapMode: Text.Wrap
301 Layout.maximumWidth: maxTextSize
302 }
304 Label {
305 text: i18n.tr("Ctrl + Super + Left or Right")
306 fontSize: "small"
307 font.weight: Font.Medium
308 }
309 Label {
310 text: i18n.tr("Semi-maximizes the current window.")
311 fontSize: "small"
312 font.weight: Font.Light
313 wrapMode: Text.Wrap
314 Layout.maximumWidth: maxTextSize
315 }
317 Label {
318 text: i18n.tr("Alt + F4")
319 fontSize: "small"
320 font.weight: Font.Medium
321 }
322 Label {
323 text: i18n.tr("Closes the current window.")
324 fontSize: "small"
325 font.weight: Font.Light
326 wrapMode: Text.Wrap
327 Layout.maximumWidth: maxTextSize
328 }
329 }
331 Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
332 }
333 }