/usr/share/maliit/plugins/com/ubuntu/keys/DropShadow.qml is in ubuntu-keyboard-data 0.99.trunk.phablet2+14.04.20140415-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | // from qt-components/desktop
import QtQuick 2.0
ShaderEffect {
id: effect
anchors.fill: itemSource
anchors.leftMargin: -4 + Math.min(xOffset, 0)
anchors.rightMargin: -4 - Math.max(xOffset, 0)
anchors.topMargin: -4 + Math.min(yOffset, 0)
anchors.bottomMargin: -4 - Math.max(yOffset, 0)
property alias itemSource: innerSource.sourceItem
property real xOffset: 2
property real yOffset: 2
property real intensity: 0.2
ShaderEffectSource {
id: innerSource
x: -4 + Math.min(parent.xOffset, 0)
y: -4 + Math.min(parent.yOffset, 0)
smooth: true
sourceRect: Qt.rect(x, y, effect.width, effect.height)
hideSource: true
visible: false
}
ShaderEffectSource {
id: outerSource
smooth: true
sourceRect: Qt.rect(0, 0, effect.width, effect.height)
sourceItem: ShaderEffect {
width: effect.width
height: effect.height
property variant delta: Qt.size(1.0 / width, 0.0)
property variant source: innerSource
fragmentShader: shadowSource.fragmentShader
}
visible: false
}
ShaderEffectSource {
id: shadowSource
smooth: true
property string fragmentShader: "
uniform sampler2D source;
uniform highp vec2 delta;
varying highp vec2 qt_TexCoord0;
void main() {
gl_FragColor = 0.0538 * texture2D(source, qt_TexCoord0 - 3.182 * delta)
+ 0.3229 * texture2D(source, qt_TexCoord0 - 1.364 * delta)
+ 0.2466 * texture2D(source, qt_TexCoord0)
+ 0.3229 * texture2D(source, qt_TexCoord0 + 1.364 * delta)
+ 0.0538 * texture2D(source, qt_TexCoord0 + 3.182 * delta);
}"
sourceRect: Qt.rect(0, 0, effect.width, effect.height)
sourceItem: ShaderEffect {
width: effect.width
height: effect.height
property variant delta: Qt.size(0.0, 1.0 / height)
property variant source: outerSource
fragmentShader: shadowSource.fragmentShader
}
visible: false
}
property variant source: innerSource
property variant shadow: shadowSource
property variant delta: Qt.size(-xOffset / width, -yOffset / height)
fragmentShader: "
uniform sampler2D source;
uniform sampler2D shadow;
uniform highp float intensity;
uniform highp vec2 delta;
varying highp vec2 qt_TexCoord0;
void main() {
lowp vec4 fg = texture2D(source, qt_TexCoord0);
lowp vec4 bg = texture2D(shadow, qt_TexCoord0 + delta);
gl_FragColor = fg + vec4(0., 0., 0., intensity * bg.a) * (1. - fg.a);
}"
}
|