@@ -1,4 +1,3 @@
1−/*
21/*
32 * Copyright (C) 2016 Canonical, Ltd.
43 *
@@ -21,312 +20,316 @@ import Ubuntu.Components 1.3
2120
2221Rectangle {
2322 id: root
24− width: topLayout.childrenRect.width
25− height: topLayout.childrenRect.height
23+ width: topLayout.childrenRect.width + topLayout.anchors.leftMargin + topLayout.anchors.rightMargin
24+ height: topLayout.childrenRect.height + topLayout.anchors.topMargin + topLayout.anchors.bottomMargin
2625 color: theme.palette.normal.background
2726 radius: units.gu(.5)
2827
2928 readonly property int maxTextSize: (root.parent.width / 4) - padding
3029 readonly property int padding: units.gu(4)
3130
32− GridLayout {
33− id: topLayout
34− columns: 2
35− columnSpacing: padding
36−
37− Label {
38− Layout.columnSpan: 2
39− text: i18n.tr("Keyboard Shortcuts")
40− fontSize: "large"
41− font.weight: Font.Light
42− lineHeight: 1.6
43− }
44−
45− GridLayout {
46− columns: 2
47− columnSpacing: units.gu(4)
48− Layout.alignment: Qt.AlignTop
49−
50− // Unity 8 section
51− Label {
52− Layout.columnSpan: 2
53− text: i18n.tr("Unity 8")
54− font.weight: Font.Light
55− color: theme.palette.normal.baseText
56− lineHeight: 1.3
57− }
58−
59− Label {
60− text: i18n.tr("PrtScr")
61− fontSize: "small"
62− font.weight: Font.Medium
63− }
64− Label {
65− text: i18n.tr("Takes a screenshot.")
66− fontSize: "small"
67− font.weight: Font.Light
68− wrapMode: Text.Wrap
69− Layout.maximumWidth: maxTextSize
70− }
71−
72− Label {
73− text: i18n.tr("Alt + PrtScr")
74− fontSize: "small"
75− font.weight: Font.Medium
76− }
77− Label {
78− text: i18n.tr("Takes a screenshot of a window.")
79− fontSize: "small"
80− font.weight: Font.Light
81− wrapMode: Text.Wrap
82− Layout.maximumWidth: maxTextSize
83− }
84−
85− Label {
86− text: i18n.tr("Super + Space")
87− fontSize: "small"
88− font.weight: Font.Medium
89− }
90− Label {
91− text: i18n.tr("Switches to next keyboard layout.")
92− fontSize: "small"
93− font.weight: Font.Light
94− wrapMode: Text.Wrap
95− Layout.maximumWidth: maxTextSize
96− }
97−
98− Label {
99− text: i18n.tr("Super + Shift + Space")
100− fontSize: "small"
101− font.weight: Font.Medium
102− }
103− Label {
104− text: i18n.tr("Switches to previous keyboard layout.")
105− fontSize: "small"
106− font.weight: Font.Light
107− wrapMode: Text.Wrap
108− Layout.maximumWidth: maxTextSize
109− }
110−
111−
112− // Launcher section
113− Item { Layout.columnSpan: 2; height: units.gu(2) }
114− Label {
115− Layout.columnSpan: 2
116− text: i18n.tr("Launcher")
117− font.weight: Font.Light
118− color: theme.palette.normal.baseText
119− lineHeight: 1.3
120− }
121−
122− Label {
123− text: i18n.tr("Super (Hold)")
124− fontSize: "small"
125− font.weight: Font.Medium
126− }
127− Label {
128− text: i18n.tr("Opens the launcher, displays shortcuts.")
129− fontSize: "small"
130− font.weight: Font.Light
131− wrapMode: Text.Wrap
132− Layout.maximumWidth: maxTextSize
133− }
134−
135− Label {
136− text: i18n.tr("Alt + F1")
137− fontSize: "small"
138− font.weight: Font.Medium
139− }
140− Label {
141− text: i18n.tr("Opens launcher keyboard navigation mode.")
142− fontSize: "small"
143− font.weight: Font.Light
144− wrapMode: Text.Wrap
145− Layout.maximumWidth: maxTextSize
146− }
147−
148− Label {
149− text: i18n.tr("Super + Tab")
150− fontSize: "small"
151− font.weight: Font.Medium
152− }
153− Label {
154− text: i18n.tr("Switches applications via the launcher.")
155− fontSize: "small"
156− font.weight: Font.Light
157− wrapMode: Text.Wrap
158− Layout.maximumWidth: maxTextSize
159− }
160−
161− Label {
162− text: i18n.tr("Super + 0 to 9")
163− fontSize: "small"
164− font.weight: Font.Medium
165− }
166− Label {
167− text: i18n.tr("Same as clicking on a launcher icon.")
168− fontSize: "small"
169− font.weight: Font.Light
170− wrapMode: Text.Wrap
171− Layout.maximumWidth: maxTextSize
172− }
173−
174−
175− // Scopes section
176− Item { Layout.columnSpan: 2; height: units.gu(2) }
177− Label {
178− Layout.columnSpan: 2
179− text: i18n.tr("Scopes")
180− font.weight: Font.Light
181− color: theme.palette.normal.baseText
182− lineHeight: 1.3
183− }
184−
185− Label {
186− text: i18n.tr("Super (Tap)")
187− fontSize: "small"
188− font.weight: Font.Medium
189− }
190− Label {
191− text: i18n.tr("Opens the Scopes home.")
192− fontSize: "small"
193− font.weight: Font.Light
194− wrapMode: Text.Wrap
195− Layout.maximumWidth: maxTextSize
196− }
197− }
198−
31+ Item {
19932 GridLayout {
33+ id: topLayout
34+ anchors.fill: parent
35+ anchors.margins: padding
20036 columns: 2
20137 columnSpacing: padding
202− Layout.alignment: Qt.AlignTop
20338
204− // Switching section
20539 Label {
20640 Layout.columnSpan: 2
207− text: i18n.tr("Switching")
208− font.weight: Font.Light
209− color: theme.palette.normal.baseText
210− lineHeight: 1.3
211− }
212−
213− Label {
214− text: i18n.tr("Alt + Tab")
215− fontSize: "small"
216− font.weight: Font.Medium
217− }
218− Label {
219− text: i18n.tr("Switches between applications.")
220− fontSize: "small"
41+ text: i18n.tr("Keyboard Shortcuts")
42+ fontSize: "large"
22143 font.weight: Font.Light
222− wrapMode: Text.Wrap
223− Layout.maximumWidth: maxTextSize
224− }
225−
226− Label {
227− text: i18n.tr("Super + W")
228− fontSize: "small"
229− font.weight: Font.Medium
230− }
231− Label {
232− text: i18n.tr("Opens the desktop spread.")
233− fontSize: "small"
234− font.weight: Font.Light
235− wrapMode: Text.Wrap
236− Layout.maximumWidth: maxTextSize
237− }
238−
239− Label {
240− text: i18n.tr("Cursor Left or Right")
241− fontSize: "small"
242− font.weight: Font.Medium
243− }
244− Label {
245− text: i18n.tr("Moves the focus.")
246− fontSize: "small"
247− font.weight: Font.Light
248− wrapMode: Text.Wrap
249− Layout.maximumWidth: maxTextSize
250− }
251−
252−
253− // Windows section
254− Item { Layout.columnSpan: 2; height: units.gu(2) }
255− Label {
256− Layout.columnSpan: 2
257− text: i18n.tr("Windows")
258− font.weight: Font.Light
259− color: theme.palette.normal.baseText
260− lineHeight: 1.3
261− }
262−
263− Label {
264− text: i18n.tr("Ctrl + Super + D")
265− fontSize: "small"
266− font.weight: Font.Medium
267− }
268− Label {
269− text: i18n.tr("Minimizes all windows.")
270− fontSize: "small"
271− font.weight: Font.Light
272− wrapMode: Text.Wrap
273− Layout.maximumWidth: maxTextSize
274− }
275−
276− Label {
277− text: i18n.tr("Ctrl + Super + Up")
278− fontSize: "small"
279− font.weight: Font.Medium
280− }
281− Label {
282− text: i18n.tr("Maximizes the current window.")
283− fontSize: "small"
284− font.weight: Font.Light
285− wrapMode: Text.Wrap
286− Layout.maximumWidth: maxTextSize
287− }
288−
289− Label {
290− text: i18n.tr("Ctrl + Super + Down")
291− fontSize: "small"
292− font.weight: Font.Medium
293− }
294− Label {
295− text: i18n.tr("Minimizes or restores the current window.")
296− fontSize: "small"
297− font.weight: Font.Light
298− wrapMode: Text.Wrap
299− Layout.maximumWidth: maxTextSize
300− }
301−
302− Label {
303− text: i18n.tr("Ctrl + Super + Left or Right")
304− fontSize: "small"
305− font.weight: Font.Medium
306− }
307− Label {
308− text: i18n.tr("Semi-maximizes the current window.")
309− fontSize: "small"
310− font.weight: Font.Light
311− wrapMode: Text.Wrap
312− Layout.maximumWidth: maxTextSize
313− }
314−
315− Label {
316− text: i18n.tr("Alt + F4")
317− fontSize: "small"
318− font.weight: Font.Medium
319− }
320− Label {
321− text: i18n.tr("Closes the current window.")
322− fontSize: "small"
323− font.weight: Font.Light
324− wrapMode: Text.Wrap
325− Layout.maximumWidth: maxTextSize
326− }
44+ lineHeight: 1.6
45+ }
46+
47+ GridLayout {
48+ columns: 2
49+ columnSpacing: units.gu(4)
50+ Layout.alignment: Qt.AlignTop
51+
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+ }
60+
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+ }
73+
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+ }
86+
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+ }
99+
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+ }
112+
113+
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+ }
123+
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+ }
136+
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+ }
149+
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+ }
162+
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+ }
175+
176+
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+ }
186+
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+ }
200+
201+ GridLayout {
202+ columns: 2
203+ columnSpacing: padding
204+ Layout.alignment: Qt.AlignTop
205+
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+ }
214+
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+ }
227+
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+ }
240+
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+ }
253+
254+
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+ }
264+
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+ }
277+
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+ }
290+
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+ }
303+
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+ }
316+
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+ }
330+
331+ Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
327332 }
328−
329− Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
330333 }
331334}
332335