on xenial help sign in
Initial support for noshape-icon hint, which allows to have an icon not masked with an UbuntuShape.
c5af873Mirco Müller
Notifications/Notification.qml+13−2
@@ -101,13 +101,24 @@ UbuntuShape {
101 right: parent.right
101 right: parent.right
102 }
102 }
103
103
104+ Image {
105+ id: noShapeIcon
106+
107+ fillMode: Image.PreserveAspectCrop
108+ objectName: "noShapeIcon"
109+ width: units.gu(6)
110+ height: units.gu(6)
111+ source: iconSource
112+ visible: iconSource !== undefined && iconSource !== "" && notification.hints["x-canonical-noshape-icon"] == "true"
113+ }
114+
104 UbuntuShape {
115 UbuntuShape {
105 id: icon
116 id: icon
106
117
107 objectName: "icon"
118 objectName: "icon"
108 width: units.gu(6)
119 width: units.gu(6)
109 height: units.gu(6)
120 height: units.gu(6)
110− visible: iconSource !== undefined && iconSource != ""
121+ visible: iconSource !== undefined && iconSource !== "" && notification.hints["x-canonical-noshape-icon"] !== "true"
111 image: Image {
122 image: Image {
112 id: avatarIcon
123 id: avatarIcon
113
124
@@ -129,7 +140,7 @@ UbuntuShape {
129 id: labelColumn
140 id: labelColumn
130 width: parent.width - x
141 width: parent.width - x
131
142
132− anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
143+ anchors.verticalCenter: ((icon.visible || noShapeIcon.visible) && !bodyLabel.visible) ? (icon.visible ? icon.verticalCenter : noShapeIcon.verticalCenter) : undefined
133
144
134 Label {
145 Label {
135 id: summaryLabel
146 id: summaryLabel