@@ -114,7 +114,8 @@ FocusScope {
114 x: previewListView.open ? -width : 0
114 x: previewListView.open ? -width : 0
115 Behavior on x { UbuntuNumberAnimation { } }
115 Behavior on x { UbuntuNumberAnimation { } }
116 width: parent.width
116 width: parent.width
117+ height: floatingSeeLess.visible ? parent.height - floatingSeeLess.height : parent.height
117− height: parent.height
118+ clip: height != parent.height
119 model: scopeView.categories
120 model: scopeView.categories
120 forceNoClip: previewListView.open
121 forceNoClip: previewListView.open
@@ -321,6 +322,7 @@ FocusScope {
321 onClicked: {
322 onClicked: {
322 if (categoryView.expandedCategoryId != baseItem.category) {
323 if (categoryView.expandedCategoryId != baseItem.category) {
323 categoryView.expandedCategoryId = baseItem.category;
324 categoryView.expandedCategoryId = baseItem.category;
325+ floatingSeeLess.companionTo = seeAll;
325 categoryView.expandedCategoryId = "";
327 categoryView.expandedCategoryId = "";
@@ -403,6 +405,54 @@ FocusScope {
411+ property var companionTo: null
412+ property bool companionLowerThanSelf: false
414+ objectName: "floatingSeeLess"
416+ bottom: parent.bottom
417+ left: categoryView.left
418+ right: categoryView.right
420+ height: seeLessLabel.font.pixelSize + units.gu(4)
421+ visible: companionTo && companionLowerThanSelf
423+ onClicked: categoryView.expandedCategoryId = "";
425+ function updateLowerThan() {
426+ var pos = companionTo.mapToItem(floatingSeeLess, 0, 0);
427+ companionLowerThanSelf = pos.y >= 0;
428+ if (!companionLowerThanSelf && categoryView.expandedCategoryId === "") {
435+ text: i18n.tr("See less")
438+ verticalCenterOffset: units.gu(-0.5)
441+ font.weight: Font.Bold
442+ color: scopeStyle ? scopeStyle.foreground : "grey"
446+ target: floatingSeeLess.companionTo ? categoryView : null
447+ onContentYChanged: floatingSeeLess.updateLowerThan();
451+ target: floatingSeeLess.companionTo ? floatingSeeLess.companionTo : null
452+ onYChanged: floatingSeeLess.updateLowerThan();
406 LimitProxyModel {
456 LimitProxyModel {
407 id: previewLimitModel
457 id: previewLimitModel