Portrait mode in Harmattan (Scratchbox)
-
I'm running Xephyr in 480x854 and set /meegotouch/target/name to DefaultPortrait and it works. How do I set the QML application to appear in portrait mode? I tried all the Page orientationLock property alternatives, but none of them works. Seems graphicsview is still in 854x480 mode.
-
I found the following code in "mdeclarativescreen.cpp":http://qt.gitorious.org/qt-components/qt-components/blobs/master/src/meego/mdeclarativescreen.cpp
@
MDeclarativeScreenPrivate::MDeclarativeScreenPrivate(MDeclarativeScreen *qq)
: q(qq)
, orientation(MDeclarativeScreen::Landscape)
, finalOrientation(MDeclarativeScreen::Landscape)
, allowedOrientations(MDeclarativeScreen::Landscape | MDeclarativeScreen::Portrait)
, isCovered(false)
, keyboardOpen(false)
, isTvConnected(false)
, topLevelWidget(0)
, oldEventFilter(0)
#ifdef Q_WS_X11
, windowId(0)
#endif
#ifdef HAVE_CONTEXTSUBSCRIBER
, topEdgeProperty("Screen.TopEdge")
, remoteTopEdgeProperty("RemoteScreen.TopEdge")
, isCoveredProperty("Screen.IsCovered")
, keyboardOpenProperty("/maemo/InternalKeyboard/Open")
, videoRouteProperty("com.nokia.policy.video_route")
, remoteTopEdgeListener(remoteTopEdgeProperty.info()->providerDBusType(),
remoteTopEdgeProperty.info()->providerDBusName())
#endif
, minimized(false)
{
// TODO: Could use QDesktopWidget, but what about on host PC?
displaySize = QSize(854, 480);
screenSize = QSize(displaySize.width(), displaySize.height());oldEventFilter = QCoreApplication::instance()->setEventFilter(x11EventFilter); //Q_ASSERT(gScreenPrivate == 0); gScreenPrivate = this;
}
@
Could it be that displaySize and screenSize forces the UI to landscape mode by default?I've had some issues with splash screens (which you can pass to the invoker) being rotated and scaled from portrait to landscape while I'm holding the device in portrait
-
Scratchbox sounds like a bit off-topic here? Anyway, you can find an answer here: http://forum.meego.com/showthread.php?p=24023#post24023
I haven't followed the entire thread but that is surely a good place to ask Scratchbox&&Harmattan related questions.