on xenial help sign in
Drop all visual indication of "pinning" Fixes: 1381054
04fcea5Michael Zanetti
qml/Launcher/LauncherDelegate.qml+2−19
@@ -27,7 +27,6 @@ Item {
27 property bool itemFocused: false
27 property bool itemFocused: false
28 property real maxAngle: 0
28 property real maxAngle: 0
29 property bool inverted: false
29 property bool inverted: false
30− property alias pinned: pin.visible
31
30
32 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
31 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
33 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
32 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
@@ -71,31 +70,15 @@ Item {
71 height: root.itemHeight - units.gu(1)
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 UbuntuShape {
73 UbuntuShape {
88 id: countEmblem
74 id: countEmblem
89 objectName: "countEmblem"
75 objectName: "countEmblem"
90−
91− readonly property real pinMargin: pin.visible ? pin.width + units.gu(1) - anchors.leftMargin : 0
92−
93 anchors {
76 anchors {
94 right: parent.right
77 right: parent.right
95 top: parent.top
78 top: parent.top
96 margins: units.dp(3)
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 height: units.gu(2)
82 height: units.gu(2)
100 color: UbuntuColors.orange
83 color: UbuntuColors.orange
101 visible: root.countVisible
84 visible: root.countVisible
@@ -109,7 +92,7 @@ Item {
109 // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
92 // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
110 // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
93 // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
111 anchors.verticalCenterOffset: -units.dp(.5)
94 anchors.verticalCenterOffset: -units.dp(.5)
112− width: root.itemWidth - units.gu(1) - countEmblem.pinMargin
95+ width: root.itemWidth - units.gu(1)
113 horizontalAlignment: Text.AlignHCenter
96 horizontalAlignment: Text.AlignHCenter
114 elide: Text.ElideRight
97 elide: Text.ElideRight
115 color: "white"
98 color: "white"
qml/Launcher/LauncherPanel.qml−5
@@ -151,7 +151,6 @@ Rectangle {
151 count: model.count
151 count: model.count
152 countVisible: model.countVisible
152 countVisible: model.countVisible
153 progress: model.progress
153 progress: model.progress
154− pinned: model.pinned
155 itemFocused: model.focused
154 itemFocused: model.focused
156 inverted: root.inverted
155 inverted: root.inverted
157 z: -Math.abs(offset)
156 z: -Math.abs(offset)
@@ -462,10 +461,6 @@ Rectangle {
462 width: itemWidth
461 width: itemWidth
463 rotation: root.rotation
462 rotation: root.rotation
464 itemOpacity: 0.9
463 itemOpacity: 0.9
465− pinned: dndArea.draggedIndex > -1 &&
466− LauncherModel.get(dndArea.draggedIndex).pinned &&
467− !dndArea.preDragging &&
468− !dndArea.dragging
469
464
470 function flatten() {
465 function flatten() {
471 fakeDragItemAnimation.start();
466 fakeDragItemAnimation.start();