I have made the following changes intended for : CE:UX:MTF / lipstick-colorful-home
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7003 Thank You, Marko Saukko [This message was auto-generated] --- Request # 7003: Messages from BOSS: State: review at 2012-10-14T00:34:39 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: Project:MTF:UX / lipstick-colorful-home -> CE:UX:MTF / lipstick-colorful-home changes files: -------------- --- lipstick-colorful-home.changes +++ lipstick-colorful-home.changes @@ -0,0 +1,8 @@ +* Sat Oct 13 2012 Robin Burchell <[email protected]> - 0.0.8 +- Rename binary for easier testing (from Robin) +- Pull in desktop wallpaper from the theme instead of hardcoding it (from Robin) +- Use configured wallpaper on the lockscreen too (from Robin) +- Round window corners for better asthetics (from Robin) +- Use smooth scaling for window thumbnails for better asthetics (from Robin) +- Fix some bugs with lockscreen animation (from Robin) + old: ---- lipstick-colorful-home-0.0.7.tar.bz2 new: ---- lipstick-colorful-home-0.0.8.tar.bz2 spec files: ----------- --- lipstick-colorful-home.spec +++ lipstick-colorful-home.spec @@ -9,7 +9,7 @@ # << macros Summary: A nice homescreen -Version: 0.0.7 +Version: 0.0.8 Release: 1 Group: System/GUI/Other License: BSD @@ -18,7 +18,7 @@ Source1: lipstick.desktop Source2: lipstick.service Source100: lipstick-colorful-home.yaml -Requires: lipstick >= 0.4.0 +Requires: lipstick >= 0.4.1 BuildRequires: pkgconfig(QtCore) BuildRequires: pkgconfig(QtDeclarative) BuildRequires: pkgconfig(QtOpenGL) @@ -66,7 +66,7 @@ %files %defattr(-,root,root,-) -%{_bindir}/colorful-home +%{_bindir}/lipstick %{_libdir}/systemd/user/lipstick.service %config /etc/xdg/autostart/*.desktop # >> files other changes: -------------- ++++++ lipstick-colorful-home-0.0.7.tar.bz2 -> lipstick-colorful-home-0.0.8.tar.bz2 Binary files src/images/Clarity_by_pr09studio.jpg deleted --- src/qml/MainScreen.qml +++ src/qml/MainScreen.qml @@ -25,6 +25,7 @@ import QtQuick 1.1 import QtMobility.sensors 1.2 import org.nemomobile.lipstick 0.1 +import org.nemomobile.configuration 1.0 import "./components" import "./pages" @@ -107,10 +108,17 @@ onCurrentIndexChanged: pager.currentIndex = tabBar.currentIndex } + ConfigurationValue { + id: wallpaperSource + key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename" + defaultValue: "images/graphics-wallpaper-home.jpg" + } + + // The background image Image { id: background - source: ':/images/background.jpg' + source: "file://" + wallpaperSource.value fillMode: Image.Stretch anchors.fill: pager --- src/qml/components/Lockscreen.qml +++ src/qml/components/Lockscreen.qml @@ -1,28 +1,32 @@ import QtQuick 1.1 -Rectangle { +Image { id: lockScreen - color: "red" + source: "file://" + wallpaperSource.value + property bool animating: y != 0 && y != -height - states: [ - State { - name: "locked" - when: LipstickSettings.lockscreenVisible - PropertyChanges { - target: lockScreen - y: 0 - } - }, - State { - name: "unlocked" - when: !LipstickSettings.lockscreenVisible - PropertyChanges { - target: lockScreen - y: -lockScreen.height - } + function hide() { + y = -height + } + + function show() { + y = 0 + } + + // can't use a binding, as we also assign y based on mousearea below + Connections { + target: LipstickSettings + onLockscreenVisibleChanged: { + if (LipstickSettings.lockscreenVisible) + lockScreen.show() + else + lockScreen.hide() } - ] - transitions: Transition { + } + + Behavior on y { + id: yBehavior + enabled: !mouseArea.fingerDown PropertyAnimation { properties: "y" easing.type: Easing.OutBounce @@ -31,26 +35,53 @@ } MouseArea { + id: mouseArea property int pressY: 0 + property bool fingerDown + property bool ignoreEvents anchors.fill: parent - onPressed: pressY = mouseY + onPressed: { + // ignore a press when we're already animating + // this can cause jitter in the lockscreen, which + // isn't really nice + if (lockScreen.animating) { + ignoreEvents = true + return + } + + fingerDown = true + pressY = mouseY + } + onPositionChanged: { + if (ignoreEvents) + return + var delta = pressY - mouseY pressY = mouseY + delta if (parent.y - delta > 0) return parent.y = parent.y - delta } + onReleased: { - if (Math.abs(parent.y) > parent.height / 3) { - console.log("Going away") - + if (ignoreEvents) { + ignoreEvents = false + return + } + + fingerDown = false + if (!LipstickSettings.lockscreenVisible || Math.abs(parent.y) > parent.height / 3) { LipstickSettings.lockscreenVisible = false + + // we must explicitly also set height, and + // not rely on the connection for the corner-case + // where the user drags the lockscreen while it's + // animating up. + lockScreen.hide() } else if (LipstickSettings.lockscreenVisible) { - console.log("No dice") - parent.state = "unlocked" - parent.state = "locked" + lockScreen.show() } } } --- src/qml/pages/AppSwitcher/SwitcherItem.qml +++ src/qml/pages/AppSwitcher/SwitcherItem.qml @@ -42,6 +42,8 @@ origin.x: windowPixmap.height / 2 origin.y: windowPixmap.height / 2 } + smooth: true + radius: 5 } } --- src/resources-images.qrc +++ src/resources-images.qrc @@ -10,6 +10,5 @@ <file>images/icons/search.png</file> <file>images/icons/settings.png</file> <file>images/icons/star.png</file> - <file alias="images/background.jpg">images/Clarity_by_pr09studio.jpg</file> </qresource> </RCC> --- src/src.pro +++ src/src.pro @@ -2,7 +2,7 @@ # Main project file for Colorful Home TEMPLATE = app -TARGET = colorful-home +TARGET = lipstick VERSION = 0.1 INSTALLS = target ++++++ lipstick-colorful-home.yaml --- lipstick-colorful-home.yaml +++ lipstick-colorful-home.yaml @@ -1,6 +1,6 @@ Name: lipstick-colorful-home Summary: A nice homescreen -Version: 0.0.7 +Version: 0.0.8 Release: 1 Group: System/GUI/Other License: BSD @@ -17,7 +17,7 @@ Description: A homescreen for Nemo Mobile Builder: qmake Requires: - - lipstick >= 0.4.0 + - lipstick >= 0.4.1 PkgConfigBR: - QtCore - QtDeclarative @@ -28,6 +28,6 @@ Conflicts: - lipstick-example-home Files: - - "%{_bindir}/colorful-home" + - "%{_bindir}/lipstick" - "%{_libdir}/systemd/user/lipstick.service" - "%config /etc/xdg/autostart/*.desktop"
