~mterry/+junk/u8.2

« back to all changes in this revision

Viewing changes to qml/Launcher/LauncherDelegate.qml

  • Committer: Michael Terry
  • Date: 2014-11-17 14:56:04 UTC
  • mfrom: (1317.1.118 unity8)
  • Revision ID: michael.terry@canonical.com-20141117145604-96dn9p5nwkifq2f4
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    property bool itemFocused: false
28
28
    property real maxAngle: 0
29
29
    property bool inverted: false
30
 
    property alias pinned: pin.visible
31
30
 
32
31
    readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
33
32
    readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
71
70
            height: root.itemHeight - units.gu(1)
72
71
        }
73
72
 
74
 
        Rectangle {
75
 
            id: pin
76
 
            anchors {
77
 
                left: iconShape.left
78
 
                top: iconShape.top
79
 
                topMargin: -units.dp(2)
80
 
            }
81
 
            width: units.gu(1)
82
 
            height: width
83
 
            radius: width / 2
84
 
            color: "white"
85
 
        }
86
 
 
87
73
        UbuntuShape {
88
74
            id: countEmblem
89
75
            objectName: "countEmblem"
90
 
 
91
 
            readonly property real pinMargin: pin.visible ? pin.width + units.gu(1) - anchors.leftMargin : 0
92
 
 
93
76
            anchors {
94
77
                right: parent.right
95
78
                top: parent.top
96
79
                margins: units.dp(3)
97
80
            }
98
 
            width: Math.min(root.itemWidth - pinMargin, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
 
81
            width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
99
82
            height: units.gu(2)
100
83
            color: UbuntuColors.orange
101
84
            visible: root.countVisible
109
92
                // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
110
93
                // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
111
94
                anchors.verticalCenterOffset: -units.dp(.5)
112
 
                width: root.itemWidth - units.gu(1) - countEmblem.pinMargin
 
95
                width: root.itemWidth - units.gu(1)
113
96
                horizontalAlignment: Text.AlignHCenter
114
97
                elide: Text.ElideRight
115
98
                color: "white"