@@ -28,6 +28,7 @@ FocusScope {
28 property int panelWidth: 0
28 property int panelWidth: 0
29 readonly property bool moving: listLoader.item && listLoader.item.moving
29 readonly property bool moving: listLoader.item && listLoader.item.moving
30 readonly property Item searchTextField: searchField
30 readonly property Item searchTextField: searchField
31+ readonly property real delegateWidth: units.gu(10)
32 signal applicationSelected(string appId)
33 signal applicationSelected(string appId)
@@ -272,7 +273,7 @@ FocusScope {
273 model: sortProxyModel
274 model: sortProxyModel
275− delegateWidth: units.gu(8)
276+ delegateWidth: root.delegateWidth
276 delegateHeight: units.gu(10)
277 delegateHeight: units.gu(10)
277 delegate: drawerDelegateComponent
278 delegate: drawerDelegateComponent
@@ -332,7 +333,7 @@ FocusScope {
332 filterLetter: model.letter
333 filterLetter: model.letter
333 dynamicSortFilter: false
334 dynamicSortFilter: false
335− delegateWidth: units.gu(8)
336+ delegateWidth: root.delegateWidth
336 delegateHeight: units.gu(10)
337 delegateHeight: units.gu(10)
337 delegate: drawerDelegateComponent
338 delegate: drawerDelegateComponent
@@ -352,6 +353,7 @@ FocusScope {
352 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus
353 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus
354 onClicked: root.applicationSelected(model.appId)
355 onClicked: root.applicationSelected(model.appId)
356+ z: loader.active ? 1 : 0
357 width: units.gu(8)
359 width: units.gu(8)
@@ -384,11 +386,50 @@ FocusScope {
387 text: model.name
390 text: model.name
388 width: parent.width
391 width: parent.width
389 horizontalAlignment: Text.AlignHCenter
392 horizontalAlignment: Text.AlignHCenter
390 fontSize: "small"
393 fontSize: "small"
391 elide: Text.ElideRight
394 elide: Text.ElideRight
401+ aux = label.width / 2 - item.width / 2;
402+ var containerXMap = mapToItem(contentContainer, aux, 0).x
403+ if (containerXMap < 0) {
404+ aux = aux - containerXMap;
407+ if (containerXMap + item.width > contentContainer.width) {
408+ aux = aux - (containerXMap + item.width - contentContainer.width);
414+ active: label.truncated && (drawerDelegate.hovered || drawerDelegate.focused)
415+ sourceComponent: Rectangle {
416+ color: UbuntuColors.jet
417+ width: fullLabel.contentWidth + units.gu(1)
418+ height: fullLabel.height + units.gu(1)
422+ width: Math.min(root.delegateWidth * 2, implicitWidth)
424+ horizontalAlignment: Text.AlignHCenter
426+ elide: Text.ElideRight
427+ anchors.centerIn: parent