[-]
[+]
|
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">104c8732bcc8f57e8f49c226bf668c7b39f0b00b</param>
+ <param name="revision">956ec93c08d712b23fb562d7b907593ce8ac90a1</param>
</service>
</services>
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.6.1.tar.bz2/.gitignore
^
|
@@ -10,3 +10,6 @@
*.lai
*.la
*.a
+
+# Creator user file
+*.pro.user
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.6.1.tar.bz2/src/main.cpp
^
|
@@ -23,12 +23,21 @@
#include <homeapplication.h>
#include <QFont>
+#include <QScreen>
#include <homewindow.h>
int main(int argc, char **argv)
{
HomeApplication app(argc, argv, QString());
+ QScreen *sc = app.primaryScreen();
+ if (sc) {
+ sc->setOrientationUpdateMask(Qt::LandscapeOrientation
+ | Qt::PortraitOrientation
+ | Qt::InvertedLandscapeOrientation
+ | Qt::InvertedPortraitOrientation);
+ }
+
QGuiApplication::setFont(QFont("Open Sans"));
setenv("EGL_PLATFORM", "wayland", 1);
setenv("QT_QPA_PLATFORM", "wayland", 1);
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.6.1.tar.bz2/src/qml/NotificationPreview.qml
^
|
@@ -25,6 +25,7 @@
import QtQuick 2.0
//import org.freedesktop.contextkit 1.0
import org.nemomobile.lipstick 0.1
+import QtQuick.Window 2.1
Item {
id: notificationWindow
@@ -34,22 +35,14 @@
width: initialSize.width
height: initialSize.height
-/*
- TODO
- ContextProperty {
- id: orientationAngleContextProperty
- key: "/Screen/CurrentWindow/OrientationAngle"
- }
-*/
-
- QtObject {
- id: orientationAngleContextProperty
- property int value: 0
+ property int orientationAngle : Screen.angleBetween(Screen.primaryOrientation,Screen.orientation)
+ onOrientationAngleChanged: {
+ console.debug("Changed to Value: "+orientationAngle)
}
MouseArea {
id: notificationArea
- property bool isPortrait: (orientationAngleContextProperty.value == 90 || orientationAngleContextProperty.value == 270)
+ property bool isPortrait: (orientationAngle == 90 || orientationAngle == 270)
property int notificationHeight: 102
property int notificationMargin: 14
property int notificationIconSize: 60
@@ -58,25 +51,37 @@
width: isPortrait ? notificationWindow.height : notificationWindow.width
height: notificationArea.notificationHeight
transform: Rotation {
- origin.x: { switch(orientationAngleContextProperty.value) {
- case 270:
- return notificationWindow.height / 2
+ origin.x: { switch(orientationAngle) {
case 180:
- case 90:
+ case 270:
return notificationWindow.width / 2
+ case 90:
+ return notificationWindow.height / 2
default:
return 0
} }
- origin.y: { switch(orientationAngleContextProperty.value) {
+ origin.y: { switch(orientationAngle) {
case 270:
+ return notificationWindow.width / 2
case 180:
- return notificationWindow.height / 2
case 90:
- return notificationWindow.width / 2
+ return notificationWindow.height / 2
default:
return 0
} }
- angle: (orientationAngleContextProperty.value === undefined || orientationAngleContextProperty.value == 0) ? 0 : -360 + orientationAngleContextProperty.value
+ angle: {
+ switch (orientationAngle) {
+ case undefined:
+ case 0:
+ return 0;
+ case 180:
+ return -180;
+ case 90:
+ return -90;
+ case 270:
+ return 90;
+ }
+ }
}
onClicked: if (notificationPreviewPresenter.notification != null) notificationPreviewPresenter.notification.actionInvoked("default")
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.6.1.tar.bz2/src/qml/USBModeSelector.qml
^
|
@@ -2,23 +2,17 @@
import org.nemomobile.lipstick 0.1
//import org.freedesktop.contextkit 1.0
import com.nokia.meego 2.0
+import QtQuick.Window 2.1
Item {
- property bool isPortrait: (orientationAngleContextProperty.value == 90 || orientationAngleContextProperty.value == 270)
+ property bool isPortrait: (orientationAngle == 90 || orientationAngle == 270)
id: usbWindow
width: initialSize.width
height: initialSize.height
-/*
- TODO
- ContextProperty {
- id: orientationAngleContextProperty
- key: "/Screen/CurrentWindow/OrientationAngle"
- }
-*/
- QtObject {
- id: orientationAngleContextProperty
- property int value: 0
+ property int orientationAngle : Screen.angleBetween(Screen.primaryOrientation,Screen.orientation)
+ onOrientationAngleChanged: {
+ console.debug("Changed to Value: "+orientationAngle)
}
Item {
@@ -27,25 +21,37 @@
width: usbWindow.isPortrait ? usbWindow.height : usbWindow.width
height: usbWindow.isPortrait ? usbWindow.width : usbWindow.height
transform: Rotation {
- origin.x: { switch(orientationAngleContextProperty.value) {
- case 270:
- return usbWindow.height / 2
+ origin.x: { switch(orientationAngle) {
case 180:
- case 90:
+ case 270:
return usbWindow.width / 2
+ case 90:
+ return usbWindow.height / 2
default:
return 0
} }
- origin.y: { switch(orientationAngleContextProperty.value) {
+ origin.y: { switch(orientationAngle) {
case 270:
+ return usbWindow.width / 2
case 180:
- return usbWindow.height / 2
case 90:
- return usbWindow.width / 2
+ return usbWindow.height / 2
default:
return 0
} }
- angle: (orientationAngleContextProperty.value === undefined || orientationAngleContextProperty.value == 0) ? 0 : -360 + orientationAngleContextProperty.value
+ angle: {
+ switch (orientationAngle) {
+ case undefined:
+ case 0:
+ return 0;
+ case 180:
+ return -180;
+ case 90:
+ return -90;
+ case 270:
+ return 90;
+ }
+ }
}
opacity: shouldBeVisible ? 1 : 0
|
[-]
[+]
|
Changed |
_service:tar_git:lipstick-colorful-home-qt5-0.6.1.tar.bz2/src/qml/VolumeControl.qml
^
|
@@ -2,27 +2,20 @@
import org.nemomobile.lipstick 0.1
//import org.freedesktop.contextkit 1.0
import com.nokia.meego 2.0
+import QtQuick.Window 2.1
Item {
id: volumeWindow
- property bool isPortrait: (orientationAngleContextProperty.value == 90 || orientationAngleContextProperty.value == 270)
+ property bool isPortrait: (orientationAngle == 90 || orientationAngle == 270)
width: initialSize.width
height: initialSize.height
-/*
- TODO
- ContextProperty {
- id: orientationAngleContextProperty
- key: "/Screen/CurrentWindow/OrientationAngle"
+ property int orientationAngle : Screen.angleBetween(Screen.primaryOrientation,Screen.orientation)
+ onOrientationAngleChanged: {
+ console.debug("Changed to Value: "+orientationAngle)
}
-*/
- QtObject {
- id: orientationAngleContextProperty
- property int value: 0
- }
-
Item {
anchors.centerIn: parent
|