on xenial help sign in
when zooming to "All" from temp scope make sure the "All" card we zoom to is on view
commit1dd293d4e14030e4f4f8f9e3b322979870116535 authorAlbert Astals <albert.astals@canonical.com> dateMon 21 Jul 2014, 13:51 (12 years ago) parentf02c7e0
3 files changed+12−1
qml/Dash/Dash.qml+1 qml/Dash/ScopesOverview.qml+10 tests/mocks/Unity/fake_scope.cpp+1−1
qml/Dash/Dash.qml+1
@@ -147,6 +147,7 @@ Showable {
147147 scopeThatOpenedScope = currentScope;
148148 scopeItem.scope = scope;
149149 scopesOverview.currentTab = 1;
150+ scopesOverview.ensureAllScopeVisible(scope.id);
150151 x = -width;
151152 }
152153 onScopeLoaded: {
qml/Dash/ScopesOverview.qml+10
@@ -115,6 +115,16 @@ Item {
115115 }
116116 }
117117
118+ function ensureAllScopeVisible(scopeId) {
119+ if (middleItems.count > 1) {
120+ var loaderItem = middleItems.itemAt(1).item;
121+ if (loaderItem) {
122+ var pos = loaderItem.scopeCardPosition(scopeId);
123+ loaderItem.contentY = Math.min(pos.y, loaderItem.contentHeight - loaderItem.height);
124+ }
125+ }
126+ }
127+
118128 onProgressChanged: {
119129 if (progress == 0) {
120130 pageHeader.resetSearch();
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -156,7 +156,7 @@ void Scope::activate(QVariant const& result)
156156 qDebug() << "Called activate on scope" << m_id << "with result" << result;
157157 if (result.toString() == "Result.2.2") {
158158 Scopes *scopes = dynamic_cast<Scopes*>(parent());
159− m_openScope = scopes->getScopeFromAll("MockScope2");
159+ m_openScope = scopes->getScopeFromAll("MockScope9");
160160 Q_EMIT openScope(m_openScope);
161161 }
162162}