~aacid/unity8/spacier_drawer

« back to all changes in this revision

Viewing changes to qml/Launcher/Drawer.qml

  • Committer: Albert Astals Cid
  • Date: 2017-04-04 10:40:29 UTC
  • Revision ID: albert.astals@canonical.com-20170404104029-fkssz00zxeqohmae
Limit fullLabel width and height

Also remove blue outline

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    property int panelWidth: 0
29
29
    readonly property bool moving: listLoader.item && listLoader.item.moving
30
30
    readonly property Item searchTextField: searchField
 
31
    readonly property real delegateWidth: units.gu(10)
31
32
 
32
33
    signal applicationSelected(string appId)
33
34
 
272
273
 
273
274
                            model: sortProxyModel
274
275
 
275
 
                            delegateWidth: units.gu(10)
 
276
                            delegateWidth: root.delegateWidth
276
277
                            delegateHeight: units.gu(10)
277
278
                            delegate: drawerDelegateComponent
278
279
                        }
332
333
                                filterLetter: model.letter
333
334
                                dynamicSortFilter: false
334
335
                            }
335
 
                            delegateWidth: units.gu(10)
 
336
                            delegateWidth: root.delegateWidth
336
337
                            delegateHeight: units.gu(10)
337
338
                            delegate: drawerDelegateComponent
338
339
                        }
413
414
                            active: label.truncated && drawerDelegate.hovered
414
415
                            sourceComponent: Rectangle {
415
416
                                color: UbuntuColors.jet
416
 
                                width: fullLabel.width + units.gu(1)
 
417
                                width: fullLabel.contentWidth + units.gu(1)
417
418
                                height: fullLabel.height + units.gu(1)
418
 
                                border.color: UbuntuColors.blue
419
419
                                radius: units.dp(4)
420
420
                                Label {
421
421
                                    id: fullLabel
 
422
                                    width: Math.min(root.delegateWidth * 2, implicitWidth)
 
423
                                    wrapMode: Text.Wrap
 
424
                                    horizontalAlignment: Text.AlignHCenter
 
425
                                    maximumLineCount: 3
 
426
                                    elide: Text.ElideRight
422
427
                                    anchors.centerIn: parent
423
428
                                    text: model.name
424
429
                                    fontSize: "small"