on xenial help sign in
Same tweaks we have for click scope now for libertine
commit9b01ee940c2d0c8ecec33b32e544b94e0a1ed304 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateFri 17 Jun 2016, 01:17 (10 years ago) parentff9fe957f65e53
5 files changed+18−7
qml/Dash/GenericScopeView.qml+5−4 tests/mocks/Unity/fake_scopes.cpp+1 tests/qmltests/Dash/tst_Dash.qml+10−1 tests/qmltests/Dash/tst_DashContent.qml+1−1 tests/qmltests/Dash/tst_DashShell.qml+1−1
qml/Dash/GenericScopeView.qml+5−4
@@ -342,8 +342,8 @@ FocusScope {
342342 }
343343 updateRanges();
344344 clickScopeSizingHacks();
345− if (scope && scope.id === "clickscope") {
346− if (categoryId === "predefined" || categoryId === "local") {
345+ if (scope && (scope.id === "clickscope" || scope.id === "libertine-scope.ubuntu_libertine-scope")) {
346+ if (scope.id === "libertine-scope.ubuntu_libertine-scope" || categoryId === "predefined" || categoryId === "local") {
347347 cardTool.artShapeSize = Qt.binding(function() { return Qt.size(units.gu(8), units.gu(7.5)) });
348348 cardTool.artShapeStyle = "icon";
349349 } else {
@@ -367,8 +367,9 @@ FocusScope {
367367 onPxpguChanged: clickScopeSizingHacks();
368368
369369 function clickScopeSizingHacks() {
370− if (scope && scope.id === "clickscope" &&
371− (categoryId === "predefined" || categoryId === "local")) {
370+ if (scope &&
371+ ((scope.id === "clickscope" && (categoryId === "predefined" || categoryId === "local")) ||
372+ scope.id === "libertine-scope.ubuntu_libertine-scope")) {
372373 // Yeah, hackish :/
373374 if (scopeView.width > units.gu(45)) {
374375 if (scopeView.width >= units.gu(70)) {
tests/mocks/Unity/fake_scopes.cpp+1
@@ -60,6 +60,7 @@ void Scopes::updateScopes()
6060 addScope(new Scope("MockScope7", "MS7", false, this));
6161 addScope(new Scope("MockScope8", "MS8", false, this));
6262 addScope(new Scope("MockScope9", "MS9", false, this));
63+ addScope(new Scope("libertine-scope.ubuntu_libertine-scope", "Libertine", true, this));
6364
6465 Scope *longNavigationScope = new Scope(
6566 "LongPrimaryNavigation", "LongPrimaryNavigation", true, this, 1, false,
tests/qmltests/Dash/tst_Dash.qml+10−1
@@ -58,7 +58,7 @@ Item {
5858 tryCompare(dashContentList, "count", 0);
5959 scopes.load();
6060 tryCompare(dashContentList, "currentIndex", 0);
61− tryCompare(dashContentList, "count", 7);
61+ tryCompare(dashContentList, "count", 8);
6262 tryCompare(scopes, "loaded", true);
6363 tryCompareFunction(function() {
6464 var mockScope1Loader = findChild(dash, "scopeLoader0");
@@ -652,6 +652,15 @@ Item {
652652 var tile = getCategoryDelegate("predefined", 2);
653653 var proportionalShape = findChildsByType(tile, "UCProportionalShape");
654654 compare(proportionalShape.length, 1);
655+
656+ dash.setCurrentScope("libertine-scope.ubuntu_libertine-scope");
657+ var dashContent = findChild(dash, "dashContent");
658+ tryCompare(dashContent.currentScope, "id", "libertine-scope.ubuntu_libertine-scope");
659+
660+ scrollToCategory("dashCategory2");
661+ tile = getCategoryDelegate("2", 2);
662+ proportionalShape = findChildsByType(tile, "UCProportionalShape");
663+ compare(proportionalShape.length, 1);
655664 }
656665
657666 function test_tempScopeItemXOnResize()
tests/qmltests/Dash/tst_DashContent.qml+1−1
@@ -124,7 +124,7 @@ Item {
124124
125125 loadScopes();
126126
127− compare(dashContentList.count, 7);
127+ compare(dashContentList.count, 8);
128128 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count);
129129 }
130130
tests/qmltests/Dash/tst_DashShell.qml+1−1
@@ -60,7 +60,7 @@ Item {
6060 tryCompare(dashContentList, "count", 0);
6161 scopes.load();
6262 tryCompare(dashContentList, "currentIndex", 0);
63− tryCompare(dashContentList, "count", 7);
63+ tryCompare(dashContentList, "count", 8);
6464 tryCompare(scopes, "loaded", true);
6565 tryCompareFunction(function() {
6666 var mockScope1Loader = findChild(dash, "scopeLoader0");