[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -3,6 +3,6 @@
<service name="tar_git">
<param name="url">https://github.com/nemomobile/lipstick-colorful-home.git</param>
<param name="branch">qt5</param>
- <param name="revision">fcca7f15dde06766d4e2b0649dd8d34152690fb8</param>
+ <param name="revision">6e33c41b328482fca8303bad0d937206f7e478dd</param>
</service>
</services>
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.5.4.tar.bz2/src/qml/compositor.qml
^
|
@@ -68,13 +68,27 @@
}
}
+ Connections {
+ target: root
+ onActiveFocusItemChanged: {
+ // Search for the layer of the focus item
+ var focusedLayer = root.activeFocusItem
+ while (focusedLayer && focusedLayer.parent !== layersParent)
+ focusedLayer = focusedLayer.parent
+
+ // reparent the overlay to the found layer
+ overlayLayer.parent = focusedLayer ? focusedLayer : overlayLayer.parent
+ }
+ }
+
Rectangle {
+ id: layersParent
anchors.fill: parent
color: "black"
Item {
id: homeLayer
- z: root.homeActive ? 3 : 1
+ z: root.homeActive ? 4 : 1
anchors.fill: parent
}
@@ -84,12 +98,19 @@
width: parent.width
height: parent.height
- visible: root.appActive
+ visible: root.appActive
+ }
+
+ Item {
+ id: overlayLayer
+ z: 5
+
+ visible: root.appActive
}
Item {
id: notificationLayer
- z: 3
+ z: 6
}
}
@@ -187,28 +208,39 @@
WindowWrapperBase { }
}
+ Component {
+ id: alphaWrapper
+ WindowWrapperAlpha { }
+ }
+
onWindowAdded: {
if (debug) console.log("Compositor: Window added \"" + window.title + "\"")
var isHomeWindow = window.isInProcess && root.homeWindow == null && window.title == "Home"
var isNotificationWindow = window.category == "notification"
+ var isOverlayWindow = window.category == "overlay"
var parent = null
if (isHomeWindow) {
parent = homeLayer
} else if (isNotificationWindow) {
parent = notificationLayer
+ } else if (isOverlayWindow){
+ parent = overlayLayer
} else {
parent = appLayer
}
- var w = windowWrapper.createObject(parent, { window: window })
+ var w;
+ if (isOverlayWindow) w = alphaWrapper.createObject(parent, { window: window })
+ else w = windowWrapper.createObject(parent, { window: window })
+
window.userData = w
-
+
if (isHomeWindow) {
root.homeWindow = w
setCurrentWindow(homeWindow)
- } else if (isNotificationWindow) {
+ } else if (isNotificationWindow || isOverlayWindow) {
} else {
setCurrentWindow(w)
}
|
[-]
[+]
|
Added |
_service:tar_git:lipstick-colorful-home-qt5-0.5.4.tar.bz2/src/qml/compositor/WindowWrapperAlpha.qml
^
|
@@ -0,0 +1,50 @@
+// Copyright (C) 2013 Jolla Ltd.
+//
+// This file is part of colorful-home, a nice user experience for touchscreens.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+import QtQuick 2.0
+
+WindowWrapperBase {
+ id: wrapper
+ ShaderEffect {
+ anchors.fill: parent
+ z: 2
+
+ // source Item must be a texture provider
+ property Item source: wrapper.window
+
+ fragmentShader: "
+ uniform sampler2D source;
+ uniform mediump float qt_Opacity;
+ varying highp vec2 qt_TexCoord0;
+ void main() {
+ gl_FragColor = qt_Opacity * texture2D(source, qt_TexCoord0);
+ }"
+ }
+ onWindowChanged: {
+ if (window != null) {
+ // do not paint the QWaylandSurfaceItem, just use it as
+ // a texture provider
+ window.setPaintEnabled(false)
+ }
+ }
+}
+
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.5.4.tar.bz2/src/resources-qml.qrc
^
|
@@ -18,5 +18,6 @@
<file>qml/compositor.qml</file>
<file>qml/compositor/ScreenGestureArea.qml</file>
<file>qml/compositor/WindowWrapperBase.qml</file>
+ <file>qml/compositor/WindowWrapperAlpha.qml</file>
</qresource>
</RCC>
|