Commit b4513e3b authored by eekkelund's avatar eekkelund Committed by eetu

[Orientation] Fix window size on launch with Qt5.12

parent 470176bd
...@@ -74,7 +74,6 @@ int main(int argc, char **argv) ...@@ -74,7 +74,6 @@ int main(int argc, char **argv)
// Fixes a bug where some applications wouldn't launch, eg. terminal or browser // Fixes a bug where some applications wouldn't launch, eg. terminal or browser
setenv("EGL_PLATFORM", "wayland", 1); setenv("EGL_PLATFORM", "wayland", 1);
setenv("QT_QPA_PLATFORM", "wayland", 1); setenv("QT_QPA_PLATFORM", "wayland", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1);
setenv("QT_IM_MODULE", "qtvirtualkeyboard", 1); setenv("QT_IM_MODULE", "qtvirtualkeyboard", 1);
app.mainWindowInstance()->showFullScreen(); app.mainWindowInstance()->showFullScreen();
return app.exec(); return app.exec();
......
...@@ -55,9 +55,9 @@ Item { ...@@ -55,9 +55,9 @@ Item {
} }
} }
function rotateObject(obj, o) { function rotateObject(obj, o, force) {
var r = Screen.angleBetween(o, Screen.primaryOrientation) var r = Screen.angleBetween(o, Screen.primaryOrientation)
if (obj.rotation !== r) if (obj.rotation !== r || force)
rotateObjectToAngle(obj, r) rotateObjectToAngle(obj, r)
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
** **
****************************************************************************************/ ****************************************************************************************/
import QtQuick 2.6 import QtQuick 2.9
import QtQuick.Controls 1.0 import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0 import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
...@@ -100,12 +100,17 @@ Page { ...@@ -100,12 +100,17 @@ Page {
} }
onParentChanged: { onParentChanged: {
glacierRotation.rotationParent = desktop.parent
glacierRotation.rotateRotationParent(nativeOrientation) glacierRotation.rotateRotationParent(nativeOrientation)
glacierRotation.rotateObject(desktop.parent, nativeOrientation, true)
} }
Component.onCompleted: { Component.onCompleted: {
glacierRotation.rotationParent = desktop.parent
setLockScreen(true)
Desktop.instance = desktop Desktop.instance = desktop
Lipstick.compositor.screenOrientation = nativeOrientation Lipstick.compositor.screenOrientation = nativeOrientation
} }
Connections { Connections {
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
import QtQuick 2.6 import QtQuick 2.9
Item { Item {
id: wrapper id: wrapper
property Item window property Item window
width: window.width width: window !== null ? window.width : 0
height: window.height height: window !== null ? window.height : 0
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(); }
......
...@@ -380,6 +380,7 @@ Item { ...@@ -380,6 +380,7 @@ Item {
} }
onSensorOrientationChanged: { onSensorOrientationChanged: {
screenOrientation = sensorOrientation screenOrientation = sensorOrientation
contentOrientation = screenOrientation
} }
onDisplayOff: if (comp.topmostAlarmWindow == null) onDisplayOff: if (comp.topmostAlarmWindow == null)
......
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