on xenial help sign in
update the shader effect source when the highlight border changes
b473918Michael Zanetti
Launcher/LauncherDelegate.qml+6−5
@@ -54,10 +54,8 @@ Item {
54
54
55 image: Image {
55 image: Image {
56 id: iconImage
56 id: iconImage
57− sourceSize: {
58− width: parent.width
57+ sourceSize.width: parent.width
59− height: parent.height
58+ sourceSize.height: parent.height
60− }
61 source: "../graphics/applicationIcons/" + root.iconName + ".png"
59 source: "../graphics/applicationIcons/" + root.iconName + ".png"
62 }
60 }
63
61
@@ -81,9 +79,11 @@ Item {
81 id: overlayHighlight
79 id: overlayHighlight
82 anchors.centerIn: iconItem
80 anchors.centerIn: iconItem
83 rotation: inverted ? 180 : 0
81 rotation: inverted ? 180 : 0
84− source: root.highlighted || mouseArea.pressed ? "graphics/selected.sci" : "graphics/non-selected.sci"
82+ source: isSelected ? "graphics/selected.sci" : "graphics/non-selected.sci"
85 width: root.width + units.gu(0.5)
83 width: root.width + units.gu(0.5)
86 height: width
84 height: width
85+ property bool isSelected: root.highlighted || mouseArea.pressed
86+ onIsSelectedChanged: shaderEffectSource.scheduleUpdate();
87 }
87 }
88 }
88 }
89
89
@@ -100,6 +100,7 @@ Item {
100
100
101
101
102 property variant source: ShaderEffectSource {
102 property variant source: ShaderEffectSource {
103+ id: shaderEffectSource
103 sourceItem: iconItem
104 sourceItem: iconItem
104 hideSource: true
105 hideSource: true
105 live: false
106 live: false