@@ -20,16 +20,20 @@ import QtQuick.Layouts 1.1
20import Ubuntu.Components 1.3
20import Ubuntu.Components 1.3
22Rectangle {
22Rectangle {
23 width: parent.width * 2/3
24 width: parent.width * 2/3
24 height: parent.height * 2/3
25 height: parent.height * 2/3
25 color: theme.palette.normal.background
26 color: theme.palette.normal.background
26 radius: units.gu(.5)
27 radius: units.gu(.5)
29+ readonly property int maxTextSize: (root.width / 4) - padding
30+ readonly property int padding: units.gu(4)
28 GridLayout {
32 GridLayout {
29 anchors.fill: parent
33 anchors.fill: parent
30− anchors.margins: units.gu(4)
34+ anchors.margins: padding
31 columns: 2
35 columns: 2
32− columnSpacing: units.gu(4)
36+ columnSpacing: padding
35 Layout.columnSpan: 2
39 Layout.columnSpan: 2
@@ -41,7 +45,6 @@ Rectangle {
42 GridLayout {
46 GridLayout {
43 columns: 2
47 columns: 2
45 columnSpacing: units.gu(4)
48 columnSpacing: units.gu(4)
46 Layout.alignment: Qt.AlignTop
49 Layout.alignment: Qt.AlignTop
@@ -63,6 +66,8 @@ Rectangle {
63 text: i18n.tr("Takes a screenshot.")
66 text: i18n.tr("Takes a screenshot.")
64 fontSize: "small"
67 fontSize: "small"
65 font.weight: Font.Light
68 font.weight: Font.Light
70+ Layout.maximumWidth: maxTextSize
@@ -74,6 +79,8 @@ Rectangle {
74 text: i18n.tr("Switches to next keyboard layout.")
79 text: i18n.tr("Switches to next keyboard layout.")
75 fontSize: "small"
80 fontSize: "small"
76 font.weight: Font.Light
81 font.weight: Font.Light
83+ Layout.maximumWidth: maxTextSize
@@ -85,6 +92,8 @@ Rectangle {
85 text: i18n.tr("Switches to previous keyboard layout.")
92 text: i18n.tr("Switches to previous keyboard layout.")
86 fontSize: "small"
93 fontSize: "small"
87 font.weight: Font.Light
94 font.weight: Font.Light
96+ Layout.maximumWidth: maxTextSize
@@ -107,6 +116,8 @@ Rectangle {
107 text: i18n.tr("Opens the launcher, displays shortcuts.")
116 text: i18n.tr("Opens the launcher, displays shortcuts.")
108 fontSize: "small"
117 fontSize: "small"
109 font.weight: Font.Light
118 font.weight: Font.Light
120+ Layout.maximumWidth: maxTextSize
@@ -118,6 +129,8 @@ Rectangle {
118 text: i18n.tr("Opens launcher keyboard navigation mode.")
129 text: i18n.tr("Opens launcher keyboard navigation mode.")
119 fontSize: "small"
130 fontSize: "small"
120 font.weight: Font.Light
131 font.weight: Font.Light
133+ Layout.maximumWidth: maxTextSize
@@ -129,6 +142,8 @@ Rectangle {
129 text: i18n.tr("Switches applications via the launcher.")
142 text: i18n.tr("Switches applications via the launcher.")
130 fontSize: "small"
143 fontSize: "small"
131 font.weight: Font.Light
144 font.weight: Font.Light
146+ Layout.maximumWidth: maxTextSize
@@ -140,6 +155,8 @@ Rectangle {
140 text: i18n.tr("Same as clicking on a launcher icon.")
155 text: i18n.tr("Same as clicking on a launcher icon.")
141 fontSize: "small"
156 fontSize: "small"
142 font.weight: Font.Light
157 font.weight: Font.Light
159+ Layout.maximumWidth: maxTextSize
@@ -162,13 +179,14 @@ Rectangle {
162 text: i18n.tr("Opens the Scopes home.")
179 text: i18n.tr("Opens the Scopes home.")
163 fontSize: "small"
180 fontSize: "small"
164 font.weight: Font.Light
181 font.weight: Font.Light
183+ Layout.maximumWidth: maxTextSize
168 GridLayout {
187 GridLayout {
169 columns: 2
188 columns: 2
171− columnSpacing: units.gu(4)
189+ columnSpacing: padding
172 Layout.alignment: Qt.AlignTop
190 Layout.alignment: Qt.AlignTop
174 // Switching section
192 // Switching section
@@ -189,6 +207,8 @@ Rectangle {
189 text: i18n.tr("Switches between applications.")
207 text: i18n.tr("Switches between applications.")
190 fontSize: "small"
208 fontSize: "small"
191 font.weight: Font.Light
209 font.weight: Font.Light
211+ Layout.maximumWidth: maxTextSize
@@ -200,6 +220,8 @@ Rectangle {
200 text: i18n.tr("Opens the desktop spread.")
220 text: i18n.tr("Opens the desktop spread.")
201 fontSize: "small"
221 fontSize: "small"
202 font.weight: Font.Light
222 font.weight: Font.Light
224+ Layout.maximumWidth: maxTextSize
@@ -211,6 +233,8 @@ Rectangle {
211 text: i18n.tr("Moves the focus.")
233 text: i18n.tr("Moves the focus.")
212 fontSize: "small"
234 fontSize: "small"
213 font.weight: Font.Light
235 font.weight: Font.Light
237+ Layout.maximumWidth: maxTextSize
@@ -233,6 +257,8 @@ Rectangle {
233 text: i18n.tr("Minimizes all windows.")
257 text: i18n.tr("Minimizes all windows.")
234 fontSize: "small"
258 fontSize: "small"
235 font.weight: Font.Light
259 font.weight: Font.Light
261+ Layout.maximumWidth: maxTextSize
@@ -244,6 +270,8 @@ Rectangle {
244 text: i18n.tr("Maximizes the current window.")
270 text: i18n.tr("Maximizes the current window.")
245 fontSize: "small"
271 fontSize: "small"
246 font.weight: Font.Light
272 font.weight: Font.Light
274+ Layout.maximumWidth: maxTextSize
@@ -255,6 +283,8 @@ Rectangle {
255 text: i18n.tr("Minimizes or restores the current window.")
283 text: i18n.tr("Minimizes or restores the current window.")
256 fontSize: "small"
284 fontSize: "small"
257 font.weight: Font.Light
285 font.weight: Font.Light
287+ Layout.maximumWidth: maxTextSize
@@ -266,6 +296,8 @@ Rectangle {
266 text: i18n.tr("Semi-maximizes the current window.")
296 text: i18n.tr("Semi-maximizes the current window.")
267 fontSize: "small"
297 fontSize: "small"
268 font.weight: Font.Light
298 font.weight: Font.Light
300+ Layout.maximumWidth: maxTextSize
@@ -277,6 +309,8 @@ Rectangle {
277 text: i18n.tr("Closes the current window.")
309 text: i18n.tr("Closes the current window.")
278 fontSize: "small"
310 fontSize: "small"
279 font.weight: Font.Light
311 font.weight: Font.Light
313+ Layout.maximumWidth: maxTextSize