on xenial help sign in
Clip infographic to the welcome screen
commiteba53748a5ae1dffcf1fd0af36a649ff9c5ddbbf authorMichael Terry <michael.terry@canonical.com> dateTue 10 Feb 2015, 12:19 (12 years ago) parent3f18c22
2 files changed+9
qml/Greeter/GreeterContent.qml+1 tests/mocks/libusermetrics/UserMetrics.cpp+8
qml/Greeter/GreeterContent.qml+1
@@ -121,6 +121,7 @@ Item {
121121 objectName: "infographics"
122122 height: narrowMode ? parent.height : 0.75 * parent.height
123123 model: greeterContentLoader.infographicModel
124+ clip: true
124125
125126 property string selectedUser
126127 property string infographicUser: AccountsService.statsWelcomeScreen ? selectedUser : ""
tests/mocks/libusermetrics/UserMetrics.cpp+8
@@ -289,6 +289,7 @@ void UserMetricsPrivate::generateFakeData()
289289 new UserMetricsData("<b>52km</b> travelled", first, firstMonth,
290290 ninth, secondMonth, this));
291291 m_fakeData.insert("single", data);
292+ m_fakeData.insert("has-pin", data);
292293 }
293294
294295 {
@@ -304,12 +305,14 @@ void UserMetricsPrivate::generateFakeData()
304305 new UserMetricsData("<b>33</b> messages today", second,
305306 firstMonth, eighth, secondMonth, this));
306307 m_fakeData.insert("single", data);
308+ m_fakeData.insert("has-pin", data);
307309 }
308310
309311 {
310312 QVariantList firstMonth;
311313 while (firstMonth.size() < 17)
312314 firstMonth.push_back(QVariant(rand()));
315+ firstMonth[8] = QVariant(1.0); // oversized 9th day, to test huge bubbles
313316 while (firstMonth.size() < 31)
314317 firstMonth.push_back(QVariant());
315318 QVariantList secondMonth;
@@ -319,6 +322,7 @@ void UserMetricsPrivate::generateFakeData()
319322 new UserMetricsData("<b>19</b> minutes talk time", eighth,
320323 firstMonth, second, secondMonth, this));
321324 m_fakeData.insert("single", data);
325+ m_fakeData.insert("has-pin", data);
322326 // Also use same data for some tablet users
323327 m_fakeData.insert("has-password", data);
324328 m_fakeData.insert("no-password", data);
@@ -386,6 +390,10 @@ void UserMetricsPrivate::nextFakeData()
386390 if (m_dataIndex == m_fakeData.constEnd() || m_dataIndex.key() != m_username)
387391 {
388392 m_dataIndex = m_fakeData.constFind(m_username);
393+ if (m_dataIndex == m_fakeData.constEnd())
394+ {
395+ m_dataIndex = m_fakeData.constFind("");
396+ }
389397 }
390398
391399 loadFakeData();