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