on xenial help sign in
add the correct margins
265cbc2Lukáš Tinkl
qml/Components/KeyboardShortcutsOverlay.qml+296−293
@@ -1,4 +1,3 @@
1−/*
2/*
1/*
3 * Copyright (C) 2016 Canonical, Ltd.
2 * Copyright (C) 2016 Canonical, Ltd.
4 *
3 *
@@ -21,312 +20,316 @@ import Ubuntu.Components 1.3
21
20
22Rectangle {
21Rectangle {
23 id: root
22 id: root
24− width: topLayout.childrenRect.width
23+ width: topLayout.childrenRect.width + topLayout.anchors.leftMargin + topLayout.anchors.rightMargin
25− height: topLayout.childrenRect.height
24+ height: topLayout.childrenRect.height + topLayout.anchors.topMargin + topLayout.anchors.bottomMargin
26 color: theme.palette.normal.background
25 color: theme.palette.normal.background
27 radius: units.gu(.5)
26 radius: units.gu(.5)
28
27
29 readonly property int maxTextSize: (root.parent.width / 4) - padding
28 readonly property int maxTextSize: (root.parent.width / 4) - padding
30 readonly property int padding: units.gu(4)
29 readonly property int padding: units.gu(4)
31
30
32− GridLayout {
31+ Item {
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−
199 GridLayout {
32 GridLayout {
33+ id: topLayout
34+ anchors.fill: parent
35+ anchors.margins: padding
200 columns: 2
36 columns: 2
201 columnSpacing: padding
37 columnSpacing: padding
202− Layout.alignment: Qt.AlignTop
203
38
204− // Switching section
205 Label {
39 Label {
206 Layout.columnSpan: 2
40 Layout.columnSpan: 2
207− text: i18n.tr("Switching")
41+ text: i18n.tr("Keyboard Shortcuts")
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"
42+ fontSize: "large"
216− font.weight: Font.Medium
217− }
218− Label {
219− text: i18n.tr("Switches between applications.")
220− fontSize: "small"
221 font.weight: Font.Light
43 font.weight: Font.Light
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
222− wrapMode: Text.Wrap
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
223− Layout.maximumWidth: maxTextSize
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+ }
224− }
199+ }
225−
200+
201+ GridLayout {
202+ columns: 2
203+ columnSpacing: padding
204+ Layout.alignment: Qt.AlignTop
205+
206+ // Switching section
226− Label {
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 {
227− text: i18n.tr("Super + W")
229+ text: i18n.tr("Super + W")
228− fontSize: "small"
230+ fontSize: "small"
229− font.weight: Font.Medium
231+ font.weight: Font.Medium
230− }
232+ }
231− Label {
233+ Label {
232− text: i18n.tr("Opens the desktop spread.")
234+ text: i18n.tr("Opens the desktop spread.")
233− fontSize: "small"
235+ fontSize: "small"
234− font.weight: Font.Light
236+ font.weight: Font.Light
235− wrapMode: Text.Wrap
237+ wrapMode: Text.Wrap
236− Layout.maximumWidth: maxTextSize
238+ Layout.maximumWidth: maxTextSize
237− }
239+ }
238−
240+
239− Label {
241+ Label {
240− text: i18n.tr("Cursor Left or Right")
242+ text: i18n.tr("Cursor Left or Right")
241− fontSize: "small"
243+ fontSize: "small"
242− font.weight: Font.Medium
244+ font.weight: Font.Medium
243− }
245+ }
244− Label {
246+ Label {
245− text: i18n.tr("Moves the focus.")
247+ text: i18n.tr("Moves the focus.")
246− fontSize: "small"
248+ fontSize: "small"
247− font.weight: Font.Light
249+ font.weight: Font.Light
248− wrapMode: Text.Wrap
250+ wrapMode: Text.Wrap
249− Layout.maximumWidth: maxTextSize
251+ Layout.maximumWidth: maxTextSize
250− }
252+ }
251−
253+
252−
254+
253− // Windows section
255+ // Windows section
254− Item { Layout.columnSpan: 2; height: units.gu(2) }
256+ Item { Layout.columnSpan: 2; height: units.gu(2) }
255− Label {
257+ Label {
256− Layout.columnSpan: 2
258+ Layout.columnSpan: 2
257− text: i18n.tr("Windows")
259+ text: i18n.tr("Windows")
258− font.weight: Font.Light
260+ font.weight: Font.Light
259− color: theme.palette.normal.baseText
261+ color: theme.palette.normal.baseText
260− lineHeight: 1.3
262+ lineHeight: 1.3
261− }
263+ }
262−
264+
263− Label {
265+ Label {
264− text: i18n.tr("Ctrl + Super + D")
266+ text: i18n.tr("Ctrl + Super + D")
265− fontSize: "small"
267+ fontSize: "small"
266− font.weight: Font.Medium
268+ font.weight: Font.Medium
267− }
269+ }
268− Label {
270+ Label {
269− text: i18n.tr("Minimizes all windows.")
271+ text: i18n.tr("Minimizes all windows.")
270− fontSize: "small"
272+ fontSize: "small"
271− font.weight: Font.Light
273+ font.weight: Font.Light
272− wrapMode: Text.Wrap
274+ wrapMode: Text.Wrap
273− Layout.maximumWidth: maxTextSize
275+ Layout.maximumWidth: maxTextSize
274− }
276+ }
275−
277+
276− Label {
278+ Label {
277− text: i18n.tr("Ctrl + Super + Up")
279+ text: i18n.tr("Ctrl + Super + Up")
278− fontSize: "small"
280+ fontSize: "small"
279− font.weight: Font.Medium
281+ font.weight: Font.Medium
280− }
282+ }
281− Label {
283+ Label {
282− text: i18n.tr("Maximizes the current window.")
284+ text: i18n.tr("Maximizes the current window.")
283− fontSize: "small"
285+ fontSize: "small"
284− font.weight: Font.Light
286+ font.weight: Font.Light
285− wrapMode: Text.Wrap
287+ wrapMode: Text.Wrap
286− Layout.maximumWidth: maxTextSize
288+ Layout.maximumWidth: maxTextSize
287− }
289+ }
288−
290+
289− Label {
291+ Label {
290− text: i18n.tr("Ctrl + Super + Down")
292+ text: i18n.tr("Ctrl + Super + Down")
291− fontSize: "small"
293+ fontSize: "small"
292− font.weight: Font.Medium
294+ font.weight: Font.Medium
293− }
295+ }
294− Label {
296+ Label {
295− text: i18n.tr("Minimizes or restores the current window.")
297+ text: i18n.tr("Minimizes or restores the current window.")
296− fontSize: "small"
298+ fontSize: "small"
297− font.weight: Font.Light
299+ font.weight: Font.Light
298− wrapMode: Text.Wrap
300+ wrapMode: Text.Wrap
299− Layout.maximumWidth: maxTextSize
301+ Layout.maximumWidth: maxTextSize
300− }
302+ }
301−
303+
302− Label {
304+ Label {
303− text: i18n.tr("Ctrl + Super + Left or Right")
305+ text: i18n.tr("Ctrl + Super + Left or Right")
304− fontSize: "small"
306+ fontSize: "small"
305− font.weight: Font.Medium
307+ font.weight: Font.Medium
306− }
308+ }
307− Label {
309+ Label {
308− text: i18n.tr("Semi-maximizes the current window.")
310+ text: i18n.tr("Semi-maximizes the current window.")
309− fontSize: "small"
311+ fontSize: "small"
310− font.weight: Font.Light
312+ font.weight: Font.Light
311− wrapMode: Text.Wrap
313+ wrapMode: Text.Wrap
312− Layout.maximumWidth: maxTextSize
314+ Layout.maximumWidth: maxTextSize
313− }
315+ }
314−
316+
315− Label {
317+ Label {
316− text: i18n.tr("Alt + F4")
318+ text: i18n.tr("Alt + F4")
317− fontSize: "small"
319+ fontSize: "small"
318− font.weight: Font.Medium
320+ font.weight: Font.Medium
319− }
321+ }
320− Label {
322+ Label {
321− text: i18n.tr("Closes the current window.")
323+ text: i18n.tr("Closes the current window.")
322− fontSize: "small"
324+ fontSize: "small"
323− font.weight: Font.Light
325+ font.weight: Font.Light
324− wrapMode: Text.Wrap
326+ wrapMode: Text.Wrap
325− Layout.maximumWidth: maxTextSize
327+ Layout.maximumWidth: maxTextSize
326− }
328+ }
329+ }
330+
331+ Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
327 }
332 }
328−
329− Item { Layout.fillHeight: true; Layout.columnSpan: 2 } // spacer
330 }
333 }
331}
334}
332
335