summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-0/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| * uikit: Deliver update requests via CADisplayLink callbackTor Arne Vestbø2016-06-171-0/+58
| | | | | | | | | | | | | | | | Improves performance over the default timer-implementation, and allows us to control the rate and paused state of the display link. Change-Id: I05761b6eb48f5e91af35735e2faa477427cd8440 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-6/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * iOS: Report correct physicalSize and physicalDotsPerInch for iPhone6+Tor Arne Vestbø2016-05-021-6/+21
| | | | | | | | | | | | | | | | | | | | On iPhone 6(s) Plus devices, or when display zoom is enabled in an iPhone 6, the render buffer is scaled before being output on the physical display. We have to take this into account when computing the physical size. Task-number: QTBUG-50941 Change-Id: I318f3a866d039fccf0ba08f381fc9d8bcd676acd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* iOS: Update pixel density (PPI) logic to detect new iOS devicesTor Arne Vestbø2015-11-191-10/+15
| | | | | | | | | | | Since the iPhone 6(S) Plus devices have a PPI of 401, we change the logic from storing the unscaled PPI to storing the scaled PPI, and applying that to a scaled geometry when computing the physical size. Task-number: QTBUG-49467 Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Clean up style in Objective-C message signaturesTor Arne Vestbø2015-05-241-4/+4
| | | | | | | | | | - Space between class/instance signifier - No space between return type and message name - No space in message arguments Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* iOS: Guard QIOSScreen against notifying Qt about changes to deleted QScreensTor Arne Vestbø2015-02-021-6/+14
| | | | | | | | | | | Now that we can rely on screen() returning 0 when the QScreen is not available we can return early from updateProperties(). We still compute the member variables as they may be accessed directly for the still alive QPlatformScreen. Change-Id: Ia7d0d29a6b50a9c932b565dc53b23d66331c275e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Limit auto-rotation to device screen (excludes external screens)Tor Arne Vestbø2015-01-241-20/+22
| | | | | | | | | | | An external screen should always stay in the native orientation of the screen, and not be affected by rotations of the device. If the user requires the external content to follow the device rotation, this can be done explicitly by listening to orientation changes of the main screen, or using QSensors. Change-Id: I3a98655d11915f0db107930e7d97a24417656bc9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Associate UIScreen and show UIWindow on initial QWindow mappingTor Arne Vestbø2015-01-231-6/+0
| | | | | | | | | | | | We delay showing the UIWindow until the first QWindow is created and mapped to the screen. This allows external screens to stay in mirror mode until a QWindow has been explicitly created on that screen. We also remove the screen-association when the last QWindow on that screen has been removed, which will return the external screen to mirror mode. Change-Id: Iccecb297281d0c4f397f69f2494debff051ade01 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Base [QIOSViewController shouldAutorotate] on the locked orientationTor Arne Vestbø2015-01-231-5/+4
| | | | | | | | | Instead of keeping a separate property for the auto-rotation. Allows us to override shouldAutorotate later on to make the decision even more fine grained. Change-Id: I9a3cd6c1316f2a5485a94ef8d9b633df87f46f5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Decouple screen geometry calculations from UIWindow geometryTor Arne Vestbø2015-01-231-11/+20
| | | | | | | | | | | | | At startup or when a new UIWindow has been created but not associated with a UIScreen yet, its geometry will be invalid, and cause the wrong geometry for its corresponding QScreen when we use it to map geometry. Instead we explicitly use the status bar orientation to map to the correct geometry. Change-Id: If37b3ab2ad5db65e20a7e3af5c3854b3e3ddff0d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Only use [UIDevice orientation] for the main/device screenTor Arne Vestbø2015-01-231-0/+4
| | | | | | | | Auxiliary screens are always in their primaryOrientation. Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Make screen orientation reporting more consistentTor Arne Vestbø2015-01-221-11/+18
| | | | | Change-Id: Ic21efb939639711c4071161e3c742525a55d41be Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Fall back to statusbar orientation for initial QScreen::orientation()Tor Arne Vestbø2015-01-211-3/+13
| | | | | | | | | | | | | | At startup, iOS will report UIDeviceOrientationUnknown for the device orientation, which toQtScreenOrientation() maps to portrait. We can be smarter than that, by falling back to the orientation of the statusbar, which in most cases match the physical orientation of the screen at startup, unless the Info.plist file has been modified to limit the possible orientations. See also: https://gist.github.com/torarnv/40c1931205e33d2b1ed3 Change-Id: I5c78fbe5c670ed2909a51b478bd4814e2433554f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Use QPlatformIntegration::destroyScreen() instead of manual deleteTor Arne Vestbø2015-01-211-1/+2
| | | | | Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Fix QWindow::reportContentOrientationChange on iOS6+Tor Arne Vestbø2015-01-091-0/+17
| | | | | | | | | | | | | On iOS 6 and above, [UIViewController supportedInterfaceOrientations] needs to return 0 for [UIApplication setStatusBarOrientation] to work. This means once you report a content orientation other than the primary orientation, you'll disable auto-rotation. Reporting the orientation as Qt::PrimaryOrientation restores the auto-rotation behavior. Change-Id: I1b8c765c507728fdbc5b828e0b4215324014e221 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Simplify view management in QIOSKeyboardListenerTor Arne Vestbø2014-12-021-0/+5
| | | | | | | | | | | | | We don't need to keep track of the view-controller or add ourselves as a gesture recognizer inside QIOSKeyboardListener. In fact, leaving the call to removeGestureRecognizer in [QIOSKeyboardListener dealloc] will result in QIOSKeyboardListener never being released, as the view that we add the recognizer to will keep a strong reference to the recognizer, so dealloc is never called unless the view is also released, which is unlikely to happen. We now fully control the lifetime of the recognizer. Change-Id: I6755e8cdfcc8f1062314db51aa54a2b7ecd1b967 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-091-2/+2
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: Move statusbar visibility handling to QIOSViewControllerTor Arne Vestbø2014-10-021-40/+0
| | | | | | | | | | | | | It doesn't belong in QIOScreen, and simplifies the flow when changing the focus window or the window state of the focus window. Both will result in calling updateProperties on the view-controller, which will re-configure the statusbar visibility and hide/show it as appropriate, before triggering a re-layout of its own view, which will in turn trigger an update of the screen properties based on the new statusbar state, before re-layouting of QWindow based on the new screen state. Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move top level window management out of QIOSScreen to ↵Tor Arne Vestbø2014-09-241-33/+0
| | | | | | | | | | | | | | | | QIOSDesktopManagerView The logic of how to deal with top level windows in the presence of rotation or status bar changes should be confined to our custom QIOSViewController that acts as a desktop manager for regular Qt applications. We no longer treat windows with full-screen or maximized geometry but without the matching window state flag as being targeted for auto-resizing. In the future we might detect this case and warn the user that windows should have the appropriate flags to be able to auto-resize on orientation changes. Change-Id: Ibab09de5cf37e77c356fbf51a54a2fcec4bb5c51 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Calculate screen (available) geometry using [UIView convertRect]Tor Arne Vestbø2014-09-241-10/+3
| | | | | | | | | | | | | Instead of custom logic to detect portrait/landscape and the height of the status bar. The latter would fail when the statusbar/orientation was set explicitly through [UIApplication setStatusBarOrientation], as the statusbar would not follow the normal behavior of covering the top part of the screen. The new code also handles upside-down portrait mode, as well as iOS8's behavior of reporting screen bounds and application frame in interface orientation instead of device orientation. Change-Id: I54e3b99246a32e17aaba13960f456fa823768fd8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-101-16/+12
| | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* iOS: Update QIOSScreen::nativeOrientation() for iOS8Tor Arne Vestbø2014-09-041-2/+9
| | | | | | | | For iOS8 and up [UIScreen bounds] changes based on the interface orientation, so we need to use [UIScreen nativeBounds] instead. Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* iOS: Initialize QScreen properties before setting up root viewcontrollerTor Arne Vestbø2014-09-011-19/+19
| | | | | Change-Id: I5fd899030b0557e9b0d96f2c065c8be5cfadd5de Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Let QScreen manage UIWindow and root view-controllerTor Arne Vestbø2014-07-231-7/+22
| | | | | | | | | | Instead of having the application delegate set up a UIWindow and root view-controller, we move the responsibility to QScreen, since in a multi screen scenario we will need one UIWindow per screen, as well as one root viewcontroller per window. Change-Id: If5b0d44b8f8a697d830b33b4fe420bff56a7629b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Detect external screen connections and expose as additional QScreenTor Arne Vestbø2014-07-211-16/+80
| | | | | | | | The additional QScreen can not be used for anything yet, since we don't set up a window and root view controller for it. Change-Id: I335b796bdd89fc58a27ec4e20c5ed355be0cab66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Workaround for misbehaving [UIScreen screens] in iOS 7.1Eduard Veleba2014-03-191-1/+3
| | | | | | | | | | | | On iOS 7.1 [UIScreen screens] sometimes returns empty NSArray which is against documentation and causes immediate application crash. This workaround uses [UIScreen mainScreen] in case [UIScreen screens] returns empty NSArray. Task-number: QTBUG-37601 Change-Id: I9b341b9ca788b5fc81804489d2e0a3af84207168 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Update screen properties when we trigger statusbar changes on iOS7Tor Arne Vestbø2013-11-291-5/+14
| | | | | | | | | Ideally we'd have a callback from iOS when this happens, so we can also react to changes done outside of Qt, but willChangeStatusBarFrame and friends do not seem to give us what we want. Change-Id: I686ce7950395a83c4257372363c773a95c3935ed Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Update statusbar visibility and screen properties before window geometryTor Arne Vestbø2013-11-251-0/+4
| | | | | | | | | | | | When setting a new window state. Otherwise we set the geometry based on the old screen properties, and then rely on the properties causing another window layout, which may not always happen. We also need to explicitly update the screen properties when the statusbar changes visibility, as there are no callbacks from iOS that consistently gives us that information. Change-Id: I1c3328aa3f34d294bc7db8884e611d205fd2c761 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Prefer window states over geometry-heuristics when laying out windowsTor Arne Vestbø2013-11-251-2/+6
| | | | | | | | | A window that was resized to the full screen size of the screen would otherwise always stay in full screen, even if the window state was maximized. Change-Id: I4720f7b6ad1d85658ea96c6da0515693e8c827f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: don't loose precision when converting CG typesRichard Moe Gustavsen2013-11-251-1/+1
| | | | | | | | | CGRect and CGPoint consist of CGFloat variables. So we should convert to QRectF and QPointF rather than QRect and QPoint. Change-Id: I76f180e4064f54d5810c49b88fdbbcd914bdb686 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Change show() to imply maximize, and showFullScreen() to hide status barTor Arne Vestbø2013-11-221-0/+29
| | | | | | | | | | | | Matches the Android behavior, and gives an easy and predictable way to show true fullscreen windows that is similar to how one would do it on a desktop platform. We keep the statusbar visibility in sync with the window state of the active window. Change-Id: Ia4b99e03f83e19f9ef56cc99b9d477cc6da4c734 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Use custom method to lay out windows instead of resizeMaximizedWindows()Tor Arne Vestbø2013-11-211-1/+27
| | | | | | | | | Since we guard against overriding the geometry in setGeometry() when a window has a window state, we need to use a custom method to lay out windows that calls applyGeometry() instead. Change-Id: I6508e6aac6746c024a6172f709b8339b35b40994 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't use auto resizing masks to deal with maximized/fullscreenTor Arne Vestbø2013-11-201-0/+3
| | | | | | | | | | | | It breaks down when the view-controller is fullscreen and we want to take statusbar height into account as well. Unfortunately we can't use constraints either, as it's iOS6+. The approach of managing the geometry manually is closer to what Android does as well. Change-Id: Ib521ba0f50b110c440ab68aacef5a524d5d41154 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Report native orientation of QScreen in relation to sizeTor Arne Vestbø2013-11-201-1/+3
| | | | | | | | Instead of hard-coding it to assume the properties of the main/device screen. Change-Id: I94c978d4334cae5be9d1094a0c315031e54e8e1f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Prepare platform screen for reacting to dynamic updates to propertiesTor Arne Vestbø2013-11-201-38/+40
| | | | | Change-Id: Idb378416da2b559ed88eb5a764cacff149264f70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't keep around reference to a single QIOSViewControllerTor Arne Vestbø2013-11-201-1/+1
| | | | | | | | We might have more of them in a multi-screen setup or when implementing support for modal windows using sub-viewcontrollers. Change-Id: Ibe98273a13af981fffe2704a2c05bfd9d3f3e9e0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Get rid of separate release pool for QIOSScreenTor Arne Vestbø2013-11-141-4/+0
| | | | | | | | | We don't use separate pools anwyhere else, and this was copied straight from the UIKit plugin. Unless there's a good reason for having it in this particular place we should keep things consistent. Change-Id: I9a3f83bcc5894a2cdfd9af7818b46d6c0f8448da Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Compare similar types when setting up QPlatformScreenTor Arne Vestbø2013-09-211-1/+1
| | | | | | | [NSArray count] returns an NSUInteger (unsigned long). Change-Id: I3b1c6720e9503ed181f01a7e737de07a277f7bde Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* iOS: Use right DPI for all iPad Minis, not just the WiFi versionTor Arne Vestbø2013-05-271-1/+1
| | | | | | | | The 3G versions are iPad2,6 and iPad2,7. Change-Id: I43a00e84535d494550bca8a533a6d16af4be6722 Reviewed-by: Ian Dean <ian@mediator-software.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't use -1 as magic value for UIDeviceOrientationFaceUp/DownTor Arne Vestbø2013-04-301-3/+12
| | | | | | | | | | | | | | | | | | | The check in [QIOSOrientationListener orientationChanged] ensured we never reported the two unsupported orientations through QPA, but we were reporting back the orientation through QIOSScreen::orientation() as well, and that didn't have a guard for -1. This resulted in crashes in client code that assumed the range of QScreen::orientation() was defined by the enum, such as the paintedwindow example. The listener now ignores the two unsupported orientations, which leaves us at the previous orientation. For the conversion function, we still have to support all UIDeviceOrientations, so we fall back to portrait for the two unsupported orientations. In the future we should consider caching the previous value explicitly, or fall back to the interface orientation. Change-Id: Ic19d0ce86b4ddea250ea927d5e8664396b2b68fd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: use an explicit pointer to qiosViewControllerRichard Moe Gustavsen2013-04-191-1/+1
| | | | | | | | | | | | | As it stood, we always relied on the root view controller being a QIOSViewController if isQtApplication() returned true. For mixed application, this might not always be true as native code can choose to replace the root view controller at times, or even rip it out, and place it as a child of another (e.g UISplitViewController). This change will give an extra protection against that. Change-Id: I0cb85796a8b82f9037c32f9e85e04e1dc7aad8e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Handle UIDeviceOrientation vs UIInterfaceOrientationTor Arne Vestbø2013-04-041-1/+1
| | | | | | | | | | The former represents the physical device orientation, the latter the UI orientation. We need to explicitly cast between them, as they are different enums, but with compatible values for the subset we use. Change-Id: I2926068802f35680cb6de5ced6dcf286014fdb2e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't crash on landscape mode startupMorten Johan Sørvig2013-02-271-1/+1
| | | | | | | | | fromPortraitToPrimary is called from the QIOSScreen constructor. This is probably to early to call QGuiApplication functions. Change-Id: I882304fd641df13dc530491990245ba9ad495377 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Enable retina resolution for stylesMorten Johan Sørvig2013-02-271-0/+5
| | | | | | | | | | The QStyle code uses the global qApp->devicePixelRatio(), which queries the screen, not the window. Implement QIOSScreen::devicePixelRatio(). Change-Id: I0091e5793f8d07ab7a46b6de443edd9457dcff85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Use 72 DPI for font size conversionTor Arne Vestbø2013-02-271-0/+5
| | | | | | | This matches how UIKit behaves Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: add convenience function to get to the root QIOSViewControllerRichard Moe Gustavsen2013-02-271-2/+2
| | | | | | | | | | | | | | | It seems that we need to access our view controller from many places, and the syntax to do so is tricky to remember. So lets just add it to our global functions, with the added bonus of a using a little cache. Note: many of these functions could be made inline, but since one concern of the plugin will be the end size of the app, I prefer to trade size for speed at this point. We can always change this later. Change-Id: I578ea9ae8218d23d635b7728a930763ca53c4eaa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>