Commit b03a72d2 authored by eekkelund's avatar eekkelund

[Keyboard] Make Maliit to respect ApplicationWindow.allowedOrientations

parent e38bf17b
......@@ -46,6 +46,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
Page {
id: root
allowedOrientations:Qt.PortraitOrientation | Qt.LandscapeOrientation
property real progress: 0
SequentialAnimation on progress {
loops: Animation.Infinite
......
......@@ -51,6 +51,7 @@ ApplicationWindow {
id: appWindow
contentOrientation: Screen.orientation
allowedOrientations: Qt.PortraitOrientation | Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation | Qt.InvertedPortraitOrientation
// Implements back key navigation
Keys.onReleased: {
......
......@@ -41,15 +41,25 @@
#include <QtGui/QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQuick/QQuickView>
#include <QScreen>
#include <glacierapp.h>
int main(int argc, char *argv[])
{
setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
QGuiApplication *app = GlacierApp::app(argc, argv);
app->setOrganizationName("NemoMobile");
QScreen* sc = app->primaryScreen();
if(sc){
sc->setOrientationUpdateMask(Qt::LandscapeOrientation
| Qt::PortraitOrientation
| Qt::InvertedLandscapeOrientation
| Qt::InvertedPortraitOrientation);
}
QQuickWindow *window = GlacierApp::showWindow();
window->setTitle(QObject::tr("Glacier components"));
......
......@@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick.Window 2.0
import QtQuick.Window 2.2
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
......@@ -47,6 +47,12 @@ NemoWindow {
readonly property var _bgColor: Theme.backgroundColor
color: _bgColor
//Handles orientation of keyboard, MInputMethodQuick.appOrientation.
contentOrientation: orientation
onOrientationChanged: {
contentOrientation=orientation
}
//README: allowedOrientations' default value is set in NemoWindow's c++ implementation
//The app developer can overwrite it from 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