on xenial help sign in
Merge
commitc20e7ed30b93e4955f83c9e35fcfaa6d2b4bb1a1 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 25 Nov 2015, 11:52 (11 years ago) parentc64976649bb8b9
3 files changed+10−1
qml/Dash/Filters/FilterOptionSelector.qml+1 qml/Dash/FiltersPopover.qml+7 tests/mocks/Unity/fake_filters.cpp+2−1
qml/Dash/Filters/FilterOptionSelector.qml+1
@@ -30,6 +30,7 @@ FilterWidget {
3030
3131 expandedHeight: collapsedHeight + column.height
3232 width: parent.width
33+ showDivider: false
3334
3435 onClicked: {
3536 expanded = !expanded;
qml/Dash/FiltersPopover.qml+7
@@ -17,6 +17,7 @@
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
1919import Ubuntu.Components.Popups 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItems
2021import "Filters" as Filters
2122
2223Popover {
@@ -77,6 +78,7 @@ Popover {
7778 }
7879
7980 Repeater {
81+ id: repeater
8082 model: scopeView.scope.filters
8183
8284 delegate: Filters.FilterWidgetFactory {
@@ -85,6 +87,11 @@ Popover {
8587 widgetId: id
8688 widgetType: type
8789 widgetData: filter
90+
91+ ListItems.ThinDivider {
92+ anchors.bottom: parent.bottom
93+ visible: index != repeater.count - 1
94+ }
8895 }
8996 }
9097 }
tests/mocks/Unity/fake_filters.cpp+2−1
@@ -25,7 +25,6 @@ Filters::Filters(Scope* parent)
2525 : unity::shell::scopes::FiltersInterface(parent)
2626{
2727 addFilter(new FakeOptionSelectorFilter("OSF1", "Tag1", "Which Cake you like More", false, QStringList() << "cheese" << "carrot" << "chocolate", this));
28− addFilter(new FakeOptionSelectorFilter("OSF2", "Tag2", "Which Countries have you been to?", true, QStringList() << "Germany" << "UK" << "New Zealand", this));
2928
3029 FakeRangeInputFilter *rif = new FakeRangeInputFilter("RIF1", "Tag3", this);
3130 rif->setTitle("How much do you want to walk?");
@@ -40,6 +39,8 @@ Filters::Filters(Scope* parent)
4039 labels[100] = "100";
4140 FakeValueSliderFilter *vsf = new FakeValueSliderFilter("VS1", "Tag4", 15, 10, 150, labels, this);
4241 addFilter(vsf);
42+
43+ addFilter(new FakeOptionSelectorFilter("OSF2", "Tag2", "Which Countries have you been to?", true, QStringList() << "Germany" << "UK" << "New Zealand", this));
4344}
4445
4546void Filters::addFilter(unity::shell::scopes::FilterBaseInterface *f)