@@ -114,7 +114,7 @@ FocusScope {
114114 x: previewListView.open ? -width : 0
115115 Behavior on x { UbuntuNumberAnimation { } }
116116 width: parent.width
117− height: floatingSeeLess.visible ? parent.height - floatingSeeLess.height : parent.height
117+ height: floatingSeeLess.visible ? parent.height - floatingSeeLess.height + floatingSeeLess.yOffset : parent.height
118118 clip: height != parent.height
119119
120120 model: scopeView.categories
@@ -323,6 +323,7 @@ FocusScope {
323323 if (categoryView.expandedCategoryId != baseItem.category) {
324324 categoryView.expandedCategoryId = baseItem.category;
325325 floatingSeeLess.companionTo = seeAll;
326+ floatingSeeLess.companionBase = baseItem;
326327 } else {
327328 categoryView.expandedCategoryId = "";
328329 }
@@ -407,26 +408,34 @@ FocusScope {
407408
408409 AbstractButton {
409410 id: floatingSeeLess
411+ objectName: "floatingSeeLess"
410412
411413 property var companionTo: null
412− property bool companionLowerThanSelf: false
414+ property var companionBase: null
415+ property bool showBecausePosition: false
416+ property real yOffset: 0
413417
414− objectName: "floatingSeeLess"
415418 anchors {
416− bottom: parent.bottom
417419 left: categoryView.left
418420 right: categoryView.right
419421 }
422+ y: parent.height - height + yOffset
420423 height: seeLessLabel.font.pixelSize + units.gu(4)
421− visible: companionTo && companionLowerThanSelf
424+ visible: companionTo && showBecausePosition
422425
423426 onClicked: categoryView.expandedCategoryId = "";
424427
425− function updateLowerThan() {
426− var pos = companionTo.mapToItem(floatingSeeLess, 0, 0);
427− companionLowerThanSelf = pos.y >= 0;
428− if (!companionLowerThanSelf && categoryView.expandedCategoryId === "") {
428+ function updateVisibility() {
429+ var companionPos = companionTo.mapToItem(floatingSeeLess, 0, 0);
430+ showBecausePosition = companionPos.y > 0;
431+
432+ var posToBase = floatingSeeLess.mapToItem(companionBase, 0, -yOffset).y;
433+ yOffset = Math.max(0, companionBase.item.collapsedHeight - posToBase);
434+ yOffset = Math.min(yOffset, height);
435+
436+ if (!showBecausePosition && categoryView.expandedCategoryId === "") {
429437 companionTo = null;
438+ companionBase = false;
430439 }
431440 }
432441
@@ -444,12 +453,12 @@ FocusScope {
444453
445454 Connections {
446455 target: floatingSeeLess.companionTo ? categoryView : null
447− onContentYChanged: floatingSeeLess.updateLowerThan();
456+ onContentYChanged: floatingSeeLess.updateVisibility();
448457 }
449458
450459 Connections {
451460 target: floatingSeeLess.companionTo ? floatingSeeLess.companionTo : null
452− onYChanged: floatingSeeLess.updateLowerThan();
461+ onYChanged: floatingSeeLess.updateVisibility();
453462 }
454463 }
455464