on a6cff49 help sign in
unity8/qml/Components/KeyboardShortcutsOverlay.qml
347 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 the current 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 }
176 Label {
177 text: i18n.tr("Super + A")
178 fontSize: "small"
179 font.weight: Font.Medium
180 }
181 Label {
182 text: i18n.tr("Opens the Application Drawer.")
183 fontSize: "small"
184 font.weight: Font.Light
185 wrapMode: Text.Wrap
186 Layout.maximumWidth: maxTextSize
187 }
190 // Scopes section
191 Item { Layout.columnSpan: 2; height: units.gu(2) }
192 Label {
193 Layout.columnSpan: 2
194 text: i18n.tr("Scopes")
195 font.weight: Font.Light
196 color: theme.palette.normal.baseText
197 lineHeight: 1.3
198 }
200 Label {
201 text: i18n.tr("Super (Tap)")
202 fontSize: "small"
203 font.weight: Font.Medium
204 }
205 Label {
206 text: i18n.tr("Opens the Scopes home.")
207 fontSize: "small"
208 font.weight: Font.Light
209 wrapMode: Text.Wrap
210 Layout.maximumWidth: maxTextSize
211 }
212 }
214 GridLayout {
215 columns: 2
216 columnSpacing: padding
217 Layout.alignment: Qt.AlignTop
219 // Switching section
220 Label {
221 Layout.columnSpan: 2
222 text: i18n.tr("Switching")
223 font.weight: Font.Light
224 color: theme.palette.normal.baseText
225 lineHeight: 1.3
226 }
228 Label {
229 text: i18n.tr("Alt + Tab")
230 fontSize: "small"
231 font.weight: Font.Medium
232 }
233 Label {
234 text: i18n.tr("Switches between applications.")
235 fontSize: "small"
236 font.weight: Font.Light
237 wrapMode: Text.Wrap
238 Layout.maximumWidth: maxTextSize
239 }
241 Label {
242 text: i18n.tr("Super + W")
243 fontSize: "small"
244 font.weight: Font.Medium
245 }
246 Label {
247 text: i18n.tr("Opens the desktop spread.")
248 fontSize: "small"
249 font.weight: Font.Light
250 wrapMode: Text.Wrap
251 Layout.maximumWidth: maxTextSize
252 }
254 Label {
255 text: i18n.tr("Cursor Left or Right")
256 fontSize: "small"
257 font.weight: Font.Medium
258 }
259 Label {
260 text: i18n.tr("Moves the focus.")
261 fontSize: "small"
262 font.weight: Font.Light
263 wrapMode: Text.Wrap
264 Layout.maximumWidth: maxTextSize
265 }
268 // Windows section
269 Item { Layout.columnSpan: 2; height: units.gu(2) }
270 Label {
271 Layout.columnSpan: 2
272 text: i18n.tr("Windows")
273 font.weight: Font.Light
274 color: theme.palette.normal.baseText
275 lineHeight: 1.3
276 }
278 Label {
279 text: i18n.tr("Ctrl + Super + D")
280 fontSize: "small"
281 font.weight: Font.Medium
282 }
283 Label {
284 text: i18n.tr("Minimizes all windows.")
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 + Up")
293 fontSize: "small"
294 font.weight: Font.Medium
295 }
296 Label {
297 text: i18n.tr("Maximizes 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 + Down")
306 fontSize: "small"
307 font.weight: Font.Medium
308 }
309 Label {
310 text: i18n.tr("Minimizes or restores 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("Ctrl + Super + Left or Right")
319 fontSize: "small"
320 font.weight: Font.Medium
321 }
322 Label {
323 text: i18n.tr("Semi-maximizes the current window.")
324 fontSize: "small"
325 font.weight: Font.Light
326 wrapMode: Text.Wrap
327 Layout.maximumWidth: maxTextSize
328 }
330 Label {
331 text: i18n.tr("Alt + F4")
332 fontSize: "small"
333 font.weight: Font.Medium
334 }
335 Label {
336 text: i18n.tr("Closes the current window.")
337 fontSize: "small"
338 font.weight: Font.Light
339 wrapMode: Text.Wrap
340 Layout.maximumWidth: maxTextSize
341 }
342 }
344 Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
345 }
346 }