Commit 876ac1c3 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Compositor files now show up in Qt Creator and added a custom window wrapper.

parent a00e4d5b
...@@ -24,7 +24,6 @@ Requires: nemo-qml-plugin-time-qt5 ...@@ -24,7 +24,6 @@ Requires: nemo-qml-plugin-time-qt5
Requires: qt5-qtdeclarative-import-window2 Requires: qt5-qtdeclarative-import-window2
Requires: qt5-qtquickcontrols-nemo Requires: qt5-qtquickcontrols-nemo
Requires: nemo-qml-plugin-contextkit-qt5 Requires: nemo-qml-plugin-contextkit-qt5
Requires: statefs-provider-bme
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0 BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0
......
...@@ -17,7 +17,6 @@ Requires: ...@@ -17,7 +17,6 @@ Requires:
- qt5-qtdeclarative-import-window2 # TODO: components dep? - qt5-qtdeclarative-import-window2 # TODO: components dep?
- qt5-qtquickcontrols-nemo - qt5-qtquickcontrols-nemo
- nemo-qml-plugin-contextkit-qt5 - nemo-qml-plugin-contextkit-qt5
- statefs-provider-bme
PkgConfigBR: PkgConfigBR:
- Qt5Core - Qt5Core
- Qt5Quick - Qt5Quick
......
...@@ -213,6 +213,11 @@ Compositor { ...@@ -213,6 +213,11 @@ Compositor {
WindowWrapperAlpha { } WindowWrapperAlpha { }
} }
Component {
id: mysticWrapper
WindowWrapperMystic { }
}
onWindowAdded: { onWindowAdded: {
if (debug) console.log("Compositor: Window added \"" + window.title + "\"") if (debug) console.log("Compositor: Window added \"" + window.title + "\"")
...@@ -242,6 +247,8 @@ Compositor { ...@@ -242,6 +247,8 @@ Compositor {
setCurrentWindow(homeWindow) setCurrentWindow(homeWindow)
} else if (isNotificationWindow || isOverlayWindow) { } else if (isNotificationWindow || isOverlayWindow) {
} else { } else {
w = mysticWrapper.createObject(parent, {window: window})
window.userData = w
setCurrentWindow(w) setCurrentWindow(w)
} }
} }
......
// Copyright (C) 2013 Jolla Ltd. // Copyright (C) 2013 Jolla Ltd, Robin Burchell: <robin.burchell@jolla.com>
// //
// This file is part of colorful-home, a nice user experience for touchscreens. // This file is part of colorful-home, a nice user experience for touchscreens.
// //
......
...@@ -28,7 +28,6 @@ Item { ...@@ -28,7 +28,6 @@ Item {
property Item window property Item window
width: window.width width: window.width
height: window.height height: window.height
NumberAnimation on opacity { id: fadeInAnimation; running: false; from: 0; to: 1 } NumberAnimation on opacity { id: fadeInAnimation; running: false; from: 0; to: 1 }
function animateIn() { fadeInAnimation.start(); } function animateIn() { fadeInAnimation.start(); }
......
// Copyright (C) 2013 Jolla Ltd, Robin Burchell: <robin.burchell@jolla.com>
// Copyright (C) 2014 Aleksi Suomalainen: <suomalainen.aleksi@gmail.com>
//
// 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.1
import QtQuick.Window 2.1
import org.nemomobile.lipstick 0.1
WindowWrapperBase {
id: wrapper
ShaderEffect {
anchors.fill: parent
z: 2
/*hasCover: coverWindowId.value != undefined ? true : false
WindowProperty {
id: coverWindowId
windowId: window.windowId
property: "SAILFISH_COVER_WINDOW"
}*/
// 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 * vec4(texture2D(source, qt_TexCoord0).rgb, 1);
}"
}
onWindowChanged: {
if (window != null) {
// do not paint the QWaylandSurfaceItem, just use it as
// a texture provider
window.setPaintEnabled(false)
}
}
}
...@@ -30,5 +30,6 @@ ...@@ -30,5 +30,6 @@
<file>qml/images/battery4.png</file> <file>qml/images/battery4.png</file>
<file>qml/images/battery5.png</file> <file>qml/images/battery5.png</file>
<file>qml/images/battery6.png</file> <file>qml/images/battery6.png</file>
<file>qml/compositor/WindowWrapperMystic.qml</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -35,6 +35,10 @@ OTHER_FILES += qml/*.qml \ ...@@ -35,6 +35,10 @@ OTHER_FILES += qml/*.qml \
qml/AppLauncher.qml \ qml/AppLauncher.qml \
qml/ToolBarLayoutExample.qml \ qml/ToolBarLayoutExample.qml \
qml/SwitcherItem.qml \ qml/SwitcherItem.qml \
qml/CloseButton.qml qml/CloseButton.qml \
qml/compositor/WindowWrapperMystic.qml \
qml/compositor/WindowWrapperBase.qml \
qml/compositor/WindowWrapperAlpha.qml \
qml/compositor/ScreenGestureArea.qml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment