2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 property bool enabled: topGapPx != positionPx || bottomGapPx != positionPx
22 property alias live: effectSource.live
23 property Item sourceItem
24 property ShaderEffectSource source: ShaderEffectSource {
26 sourceItem: effect.enabled ? effect.sourceItem : null
27 hideSource: effect.enabled
31 Qt.rect(0, -effect.topOverflow, sourceItem.width, sourceItem.height + effect.topOverflow + effect.bottomOverflow)
38 onEnabledChanged: if (!live && enabled) scheduleUpdate()
41 \qmlproperty real positionPx
42 The y coordinate of where to perform the split.
44 \qmlproperty real topGapPx
47 \qmlproperty real bottomGapPx
50 \qmlproperty real topOverflow
51 How much of the sourceItem should be sourced above its bounds.
53 \qmlproperty real bottomOverflow
54 How much of the sourceItem should be sourced below its bounds.
57 property real positionPx: 0
58 property real topGapPx: 0
59 property real bottomGapPx: height
60 property real topOverflow: 0.0
61 property real bottomOverflow: 0.0
62 property real topOpacity: 1.0
63 property real bottomOpacity: 1.0
65 property real __roundedPositionPx: Math.round(positionPx)
67 function scheduleUpdate() {
68 source.scheduleUpdate();
73 visible: effect.enabled
75 property ShaderEffectSource source: effect.source
76 property real positionPx: __roundedPositionPx
77 property real factor: effect.height / height
85 topMargin: -topOverflow - positionPx + topGapPx
87 height: topOverflow + positionPx
90 uniform highp mat4 qt_Matrix;
91 attribute highp vec4 qt_Vertex;
92 attribute highp vec2 qt_MultiTexCoord0;
93 varying highp vec2 qt_TexCoord0;
94 uniform highp float factor;
97 highp vec4 pos = qt_Vertex;
99 gl_Position = qt_Matrix * pos;
100 qt_TexCoord0 = qt_MultiTexCoord0;
107 visible: effect.enabled
108 opacity: bottomOpacity
109 property ShaderEffectSource source: effect.source
110 property real offset: effect.topOverflow + __roundedPositionPx
111 property real factor: effect.height / height
119 y: topOverflow + bottomGapPx
120 height: sourceItem.height - positionPx + bottomOverflow
123 uniform highp mat4 qt_Matrix;
124 attribute highp vec4 qt_Vertex;
125 attribute highp vec2 qt_MultiTexCoord0;
126 varying highp vec2 qt_TexCoord0;
127 uniform highp float factor;
128 uniform highp float offset;
131 highp vec4 pos = qt_Vertex;
132 pos.y = (pos.y * factor) - offset;
133 gl_Position = qt_Matrix * pos;
134 qt_TexCoord0 = qt_MultiTexCoord0;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list