@@ -21,6 +21,7 @@ import Unity.Indicators 0.1 as Indicators
2121
2222import "../Components"
2323import "../Components/ListItems"
24+import "Indicators"
2425
2526Showable {
2627 id: indicators
@@ -179,6 +180,10 @@ Showable {
179180 source: "graphics/VerticalDivider.png"
180181 }
181182
183+ VisibleIndicatorsModel {
184+ id: indicatorsModel
185+ }
186+
182187 MenuContent {
183188 id: menuContent
184189 objectName: "menuContent"
@@ -220,13 +225,9 @@ Showable {
220225 right: parent.right
221226 bottom: parent.bottom
222227 }
223− height: get_height()
228+ height: Math.max(Math.min(handleImage.height, indicators.height - handleImage.height), 0)
224229 clip: height < handleImage.height
225230
226− function get_height() {
227− return Math.max(Math.min(handleImage.height, indicators.height - handleImage.height), 0);
228− }
229−
230231 BorderImage {
231232 id: handleImage
232233 source: "graphics/handle.sci"
@@ -246,10 +247,6 @@ Showable {
246247 anchors.fill: indicatorRow
247248 }
248249
249− Indicators.IndicatorsModel {
250− id: indicatorsModel
251− }
252−
253250 IndicatorRow {
254251 id: indicatorRow
255252 objectName: "indicatorRow"
@@ -262,14 +259,6 @@ Showable {
262259 state: indicators.state
263260 unitProgress: indicators.unitProgress
264261
265− onVisibleIndicatorsChanged: {
266− // need to do it here so we can control sequence
267− if (visibleIndicators !== undefined) {
268− menuContent.visibleIndicators = visibleIndicators;
269− menuContent.setCurrentMenuIndex(currentItemIndex);
270− }
271− }
272−
273262 EdgeDragArea {
274263 id: rowDragArea
275264 anchors.fill: indicatorRow
@@ -315,7 +304,6 @@ Showable {
315304 indicators.state = "initial";
316305 initalizeItem = true;
317306 indicatorRow.currentItemOffset = 0;
318− menuContent.animateNextMenuChange = false;
319307 }
320308 }
321309 }
@@ -346,7 +334,7 @@ Showable {
346334 if (!oldActive) return;
347335 d.enableIndexChangeSignal = false;
348336
349− menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex);
337+ menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex, fullyOpened || partiallyOpened);
350338
351339 d.enableIndexChangeSignal = oldActive;
352340 }