on xenial help sign in
Per review
5201c2dJosh Arenson
qml/Dash/PageHeaderExtraPanel.qml+4−5
@@ -95,6 +95,8 @@ Item {
95 // FIXME Move to ListItem once 1556971 is fixed
95 // FIXME Move to ListItem once 1556971 is fixed
96 delegate: ListItems.Empty {
96 delegate: ListItems.Empty {
97 anchors {
97 anchors {
98+ left: parent.left
99+ right: parent.right
98 leftMargin: units.gu(2)
100 leftMargin: units.gu(2)
99 rightMargin: units.gu(2)
101 rightMargin: units.gu(2)
100 }
102 }
@@ -122,7 +124,7 @@ Item {
122 color: "#888888"
124 color: "#888888"
123 }
125 }
124
126
125− divider.visible: index != recentSearchesRepeater.count - 1 || (scope && scope.hasNavigation) || primaryFilterContainer.active
127+ divider.visible: index != recentSearchesRepeater.count - 1 || (scope && scope.hasNavigation) || primaryFilter.active
126
128
127 onClicked: root.historyItemClicked(query)
129 onClicked: root.historyItemClicked(query)
128 }
130 }
@@ -147,13 +149,10 @@ Item {
147 id: primaryFilterContainer
149 id: primaryFilterContainer
148 objectName: "primaryFilterContainer"
150 objectName: "primaryFilterContainer"
149
151
150− readonly property alias active: primaryFilter.active
151−
152 height: {
152 height: {
153 if (!active) {
153 if (!active) {
154 return 0;
154 return 0;
155− }
156− else if (contentHeight > dashNavigation.availableHeight) {
155+ } else if (contentHeight > dashNavigation.availableHeight) {
157 return dashNavigation.availableHeight;
156 return dashNavigation.availableHeight;
158 } else {
157 } else {
159 return contentHeight;
158 return contentHeight;
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -32,7 +32,7 @@ Scope::Scope(Scopes* parent) : Scope("MockScope5", "Mock Scope", false, parent)
32{
32{
33}
33}
34
34
35−Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* parent, int categories, bool returnNullPreview, QStringList primaryNavigationFilterOptionLabels)
35+Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* parent, int categories, bool returnNullPreview, const QStringList primaryNavigationFilterOptionLabels)
36 : unity::shell::scopes::ScopeInterface(parent)
36 : unity::shell::scopes::ScopeInterface(parent)
37 , m_id(id)
37 , m_id(id)
38 , m_name(name)
38 , m_name(name)
tests/mocks/Unity/fake_scope.h+2−2
@@ -34,7 +34,7 @@ class Scope : public unity::shell::scopes::ScopeInterface
34
34
35public:
35public:
36 Scope(Scopes* parent = 0);
36 Scope(Scopes* parent = 0);
37− Scope(QString const& id, QString const& name, bool favorite, Scopes* parent = 0, int categories = 20, bool returnNullPreview = false, QStringList primaryNavigationFilterOptionLabels = QStringList() << "meat" << "vegetables");
37+ Scope(QString const& id, QString const& name, bool favorite, Scopes* parent = 0, int categories = 20, bool returnNullPreview = false, const QStringList primaryNavigationFilterOptionLabels = QStringList() << "meat" << "vegetables");
38
38
39 /* getters */
39 /* getters */
40 QString id() const override;
40 QString id() const override;
@@ -122,7 +122,7 @@ protected:
122 FakeOptionSelectorFilter* m_primaryNavigationFilter;
122 FakeOptionSelectorFilter* m_primaryNavigationFilter;
123
123
124 bool m_returnNullPreview;
124 bool m_returnNullPreview;
125− QStringList m_primaryNavigationFilterOptionLabels;
125+ const QStringList m_primaryNavigationFilterOptionLabels;
126};
126};
127
127
128#endif // FAKE_SCOPE_H
128#endif // FAKE_SCOPE_H
tests/mocks/Unity/fake_scopes.cpp+10−5
@@ -60,11 +60,16 @@ void Scopes::updateScopes()
60 addScope(new Scope("MockScope7", "MS7", false, this));
60 addScope(new Scope("MockScope7", "MS7", false, this));
61 addScope(new Scope("MockScope8", "MS8", false, this));
61 addScope(new Scope("MockScope8", "MS8", false, this));
62 addScope(new Scope("MockScope9", "MS9", false, this));
62 addScope(new Scope("MockScope9", "MS9", false, this));
63+
64+ Scope *longNavigationScope = new Scope(
63− addScope(new Scope("LongPrimaryNavigation", "LongPrimaryNavigation",
65+ "LongPrimaryNavigation", "LongPrimaryNavigation", true, this, 1, false,
64− true, this, 1, false, QStringList() << "Meat" << "Vegetables" << "BBQ"
66+ QStringList() << "Meat" << "Vegetables" << "BBQ" << "Burritos"
65− << "Burritos" << "Pasta" << "Pancakes" << "Seafood" << "Soup"
67+ << "Pasta" << "Pancakes" << "Seafood" << "Soup" << "Bugs"
66− << "Bugs" << "Pudding" << "Chocolate" << "Gluten-Free" << "Hamburgers"
68+ << "Pudding" << "Chocolate" << "Gluten-Free" << "Hamburgers"
67− << "Pho" << "Panang Curry" << "Lumpia" << "Sushi"));
69+ << "Pho" << "Panang Curry" << "Lumpia" << "Sushi");
70+
71+ longNavigationScope->setHasNavigation(false);
72+ addScope(longNavigationScope);
68
73
69 addScope(new Scope("NullPreviewScope", "NPS", false, this, 1, true));
74 addScope(new Scope("NullPreviewScope", "NPS", false, this, 1, true));
70 m_scopesOverview = new ScopesOverview(this);
75 m_scopesOverview = new ScopesOverview(this);