summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Fix native GTK2 dialogs to receive focusJ-P Nurmi2014-10-061-0/+1
| | | | | | | Task-number: QTBUG-41406 Change-Id: I00f317e5ef62f63c37e9610e1f8ea00af2740b99 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Windows DirectWrite: Fix off-by-one in font descentEskil Abrahamsen Blomfeldt2014-10-061-2/+2
| | | | | | | | | | | | | | | In cb8445f0323b0eefbb04f1d8adad81a00b53abd8 we removed the historical +1 in font heights and the corresponding -1 in the descent measurement for all font engines. But the change to the direct write font engine was lost at some point during the transition to QPA, where we seem to have integrated an older version of the source file. [ChangeLog][Windows][Fonts] Fix off-by-one in font descent when using the DirectWrite font engine. Task-number: QTBUG-41783 Change-Id: Iffa24b5f2b4f6cc3a1f0034fdff63a1ee62ea9f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* iOS: Properly scope window deactivation on resignFirstResponderTor Arne Vestbø2014-10-031-1/+2
| | | | | | | | We were missing brackets, but luckily the only result was that we unconditionally flushed events through flushWindowSystemEvents. Change-Id: If10bcc6a07501b9fb0db891e01b8ecc9d794ab30 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Android: Hide vkb when IM disabled for focus objectEskil Abrahamsen Blomfeldt2014-10-031-4/+8
| | | | | | | | | | | | | | | | When the focus object changes to an object that does not have IM enabled, we should hide the keyboard instead of resetting it. This happens, for instance, if you change to a different tab in an application while a text input in the previous tab had focus. Previously the input panel would stay open and overlap part of the new tab. [ChangeLog][Android] Hide input panel when focus changes to an object that does not accept input. Change-Id: I4009d203559582fa02c15fdc1a3f009396af2531 Task-number: QTBUG-32399 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* iOS: Move statusbar visibility handling to QIOSViewControllerTor Arne Vestbø2014-10-027-59/+71
| | | | | | | | | | | | | 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>
* Windows: Transform regions of window masks correctly.Friedemann Kleint2014-10-021-1/+1
| | | | | | | | | | Add missing transformation for first rectangle of a region consisting of multiple rectangles. Task-number: QTBUG-41300 Change-Id: I1a25c422c93ceade79de79d5c49891e0a7211943 Reviewed-by: MihailNaydenov <garfieldhq@yahoo.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Warn when loading opengl32sw.dll failsKai Koehne2014-10-021-1/+3
| | | | | | | | | Print a warning when the developer/user has explicitly requested the software backend, but loading openglsw.dll fails. Change-Id: I8b1f079538ac70ceacbf1a397a276659c760a4cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: Don't include Apache code under LGPLv2 licenseEskil Abrahamsen Blomfeldt2014-10-023-14/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code which extracts style assets for the Android style is licensed under the Apache license, which is not compatible with LGPLv2.1. It is, however, compatible with LGPLv3. This means that the Android platform plugin cannot be LGPLv2.1 as long as this code is included. To minimize licensing confusion, we default to only providing LGPLv3 for Android. If you want to build a LGPLv2.1-compatible library, you can add -no-android-style-assets to the configuration. This will in turn enable the LGPLv2.1 in the configure output, and it will disable the extraction code in the platform plugin. Running the Android style with an LGPLv2.1-compatible platform plugin will work, but it will look horrible. [ChangeLog][Android] Default open-source license for Qt for Android is now LGPLv3. For compatibility with the LGPLv2.1 license, add "-no-android-style-assets" to your configuration. Change-Id: I6c7b52140f38138520871fa7c69debbb4ee90e6c Task-number: QTBUG-41365 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Use PopupMenu when possible.BogDan Vatra2014-10-014-25/+49
| | | | | | | | | | | | On API-11+ we are going to use PopupMenu instead of ContextMenu to show context menus. A PopupMenu displays a Menu in a modal popup window anchored to a View. The popup will appear below the anchor view if there is room, or above it if there is not. Task-number: QTBUG-39736 Change-Id: Ie412ab0935b868348ce5c8bb0bf53571ffefd582 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-016-4/+46
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-296-4/+46
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | * XCB: fix a memory leakGiuseppe D'Angelo2014-09-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | An early return didn't deallocate a xkb_state struct. Change-Id: I158ffc67030403636aceab985cc605888a31804b Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Cocoa: Properly remove content view from its superview in setNSWindow()Gabriel de Dietrich2014-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -[NSWindow setContentView:] doesn't make assupmtions about where that view comes from, and just attaches it to the window. We need to make sure we detach it from its previous window by calling -[NSView removeFromSuperview], or the previous NSWindow may keep references to the view. This can be an issue if the view is deleted right after. Task-number: QTBUG-39628 Change-Id: I152dedcb64ac044d8ca290c9996b388809e2477b Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * XCB: fix a possible array overflow leading to a crashGiuseppe D'Angelo2014-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QClipboard::Mode returned from modeForAtom should be checked everywhere because values greater than Selection (i.e. FindBuffer) aren't supported on X and should mean error conditions. The lack of such a check did an out-of-bounds array access, which could lead to a crash. Change-Id: I70f70b5f713ab2f892e258d4df2f7afeb434f0c1 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
| | * XCB: fix a memory leakGiuseppe D'Angelo2014-09-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | An early return caused a leak of a new'd allocated object. Change-Id: I9fbc37238dd49066d24363a2e8ee8bf35b155301 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| | * OS X: File dialog does not show "Media" section.Timur Pocheptsov2014-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug can be reproduced (AFAIK) only on 10.9. To fix it I suggest we create NSOpenPanel/NSSavePanel _every_ time it must be displayed. Actually, that's what I've seen in all code samples I was able to found - nobody tries to retain this panel and re-use it. If we re-use it, "Media" section magically disappears. I believe this bug is not Qt's bug, but something weird in Cocoa. Task-number: QTBUG-40655 Change-Id: Ic0e76e0a9a5444a76f336d511c0ff93f9fd05797 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * OS X: main window doesn't become key.Timur Pocheptsov2014-09-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ordering a key window out Cocoa tries to find a new KEY window. Looks like it prefers the current MAIN window and since QNSPanel is never a main window, Cocoa is breaking the stack order. To avoid this - try to change the key window BEFORE ordering out a window. The application has a stack of all open windows (visible and hidden), we iterate through this stack starting from our current key window and look for the nearest window below, that can become a new key window. Most probably, it will be our transient parent :) This code will change (potentially) the key window _only_ if there is a transient parent. Task-number: QTBUG-39809 Change-Id: I96b630799341875fc7e38dabf1ff6416338e687b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Make sure we don't delete child QWindows if they have WA_NativeWindow setGabriel de Dietrich2014-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a QWindow automatically deletes its child windows because they are in the QObject hierarchy. However, if the user sets both WA_NativeWindow and WA_DontCreateNativeAncestors, we can't just delete that widget's QWindow. First because the widget doesn't get notified (and maybe it should be), and then because we may invalidate any reference to the QWindow the user may have kept. Our solution is to reparent the child QWindows into the new parent's closest QWindow. We must, however, take the precaution of not keeping any reference to the backing store in the platform window. Reparenting operations can trigger repaints on the platform window, but the backing store is not set and flushed until later. Task-number: QTBUG-38377 Change-Id: I353f5528f227a227b6d10419367cbe1d5d07a94e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | kms: Support QOpenGLWidget and QQuickWidgetLaszlo Agocs2014-09-309-17/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes the handling of shareContext() for contexts and format() for windows and makes QOffscreenSurface working. Change-Id: I3c3374a9de14a5b8428de3e11d9d7e1285c5b9c7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | kms: Support non-64x64 cursorsLaszlo Agocs2014-09-302-8/+25
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-41477 Change-Id: I10a519d8560c909e87ba2f673d2da4106ce93b71 Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | Doc: Use title case in section1 titlesNico Vertriest2014-09-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | xcb: Fix detecting the fullscreen state from _NET_WM_STATE flagsAlexander Volkov2014-09-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | A fullscreen window can have maximized flags being set so first check the NetWmStateFullScreen flag. Change-Id: Ia802abf3cfa4c784baa2d55088e3f53310f0362e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Revert "winrt: Remove depth/stencil from the default window format"Andrew Knight2014-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 636d2e340206664a5885656c06e1ae9eb032d446. The issue was caused by a bug in ANGLE, not a lack of hardware support. Change-Id: If2a66cd023dc7f2329dc2812169042487eecd428 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | | cocoa: override new QPlatformMenu::popup() functionRichard Moe Gustavsen2014-09-292-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two versions of popup, one that takes a point and one that takes a target rect, causes problems for client code if they use the 'target rect' version since not all platforms override that function. So this patch will change the remaining platform that override QPlatformmenu into using the new 'target rect' version. Calling the old version that takes a point will still work, since the base version will then convert the point into a zero-sized rect, and forward the call to the 'target rect' version instead. Change-Id: Icc8531d79270a4f24ec08b8ed95b18ed3db1ad4d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | xcb: Fix logic for minimized stateAlexander Volkov2014-09-291-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | _NET_WM_STATE message can be received by a window in the minimized state. Don't change the window state in this case. Task-number: QTBUG-31117 Task-number: QTBUG-39376 Task-number: QTBUG-34430 Change-Id: Ic77a345e442891972b692803fab1e2f6aef30433 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Windows: Fix call of ToUnicodeOliver Wolff2014-09-291-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | ToUnicode sometimes gives wrong results if it is used with a keyboard buffer containing the ctrl modifier. Special cases containing alt and control might trigger the third assignment of a key, but if no alt modifier is used for the key event, we temporarily disable the control modifier in order to obtain the character with ToUnicode. Task-number: QTBUG-35734 Change-Id: Ifd88c640541b42fa65ee1dc9b55af3386714b0b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fix font enumeration, with the same family name, on Windows.Vladimir2014-09-282-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | Function EnumFontFamiliesEx with parameters (lfCharSet = DEFAULT_CHARSET, lfFaceName = '\0') enumerates only first installed font from many with same family name. This patch calls EnumFontFamiliesEx twice: 1. Without family name to enumerate families; 2. With family name to enumerate fonts with same family. Task-number: QTBUG-40828 Change-Id: Ic36a24a9e70f735a7324c05fe4b70f7c7e5710d0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Android: Add function to change the stacking order in the layout.Christian Strømme2014-09-264-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | This change enables us to reorder the stacking order used by the layout. This is necessary if we want to influence the drawing order. Lowering or raising views are done separately for native views and Qt surface views, that is, the two different view "types" are moved relative to other views of the same type and Native views are always placed on top. Change-Id: I01cbb88f8efee08877b5972cf330fd25266a2aa9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Android: Add findClass() function to the QJNIEnvironmentPrivate class.Christian Strømme2014-09-264-28/+19
| | | | | | | | | | | | | | | | | | The static QJNIEnvironmentPrivate::findClass() function exposes the cache and the class finding code in qjni. Change-Id: I42043dc993cf9cace042faf763f2a647ba79d97f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Improve the foreign-window implementationChristian Strømme2014-09-264-29/+93
| | | | | | | | | | | | | | | | | | | | | | | | Adds: - Improved geometry calculations (e.g, inside a parent) - Change visibility - proper stacking order. Native views now reserve the top of the stack to ensure that they stay visible. - React to application state changes. Change-Id: I35de0396937fff37ffcd272c9a7d8e9873a91dfb Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | direct2d: Optimize dashed line drawingAndrew Knight2014-09-261-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a combined brush/dash pattern which can be used to perform faster dashed straight-line drawing. The dash pattern is prerendered to a tiled bitmap brush, resulting in a significant speedup for lines with many elements. As the result of non-rectilinear lines may lose quality compared to the native dashed renderer, the slow/high quality codepath can be activated by setting the QPainter::HighQualityAntialiasing render hint. Task-number: QTBUG-40604 Change-Id: I771e9a81c042b4d8b6891dc9280932696e5a0694 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | direct2d: Fix composition mode supportLouai Al-Khanji2014-09-265-22/+188
| | | | | | | | | | | | | | | | | | | | | | | | When the composition mode changes to a mode which is not supported by Direct2D's primitive blending, the rendering follows the emulated (slow) code path using rasterFill(). This allows the direct2d paint engine to handle all composition modes supported by QImage. Task-number: QTBUG-40602 Change-Id: I0ac0b5c89aab2483cb2ef7768d6dec8e16913249 Done-with: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | QIOSInputContext: animate screen from current transformationRichard Moe Gustavsen2014-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we assign a fromValue to the scroll animation directly, the UIViewAnimationOptionBeginFromCurrentState flag does not have any effect. So we need to set the fromValue based on the current presentation state explicit. The reason why we need to ensure that we scroll from the current state is to avoid screen 'jumping' as a result of the scroll function being called many times during the same event loop cycle during after a focus change (focus object/window change, cursor rect change etc). Change-Id: Id98f43d60ec5d028b113361dab953569accf9b3f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | QIOSInputContext: change keyboard rect when focus window changesRichard Moe Gustavsen2014-09-251-0/+1
| | | | | | | | | | | | | | | | Since keyboard rect should be in window coordinates, it needs to change when focus window changes. Change-Id: I052aa5cadf182841d7c4eb114ebd1ea5317ff39c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | QIOSInputContext: report keyboard rect relative to focus windowRichard Moe Gustavsen2014-09-251-31/+27
| | | | | | | | | | | | | | | | After changes to how we scroll the screen, we need to change the implementation for calculating the keyboard rect as well. Change-Id: I7f468d55f6e29604b9c276deccd9926e071552a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: don't show popup on call to setVisibleRichard Moe Gustavsen2014-09-252-73/+49
| | | | | | | | | | | | | | | | | | | | | | | | It turns out that setting visibility means whether or not the menu should appear visible in a parent menu, and not to actually show or hide the popup. This means that the only way to show a popup is to call showPopup, which also makes it simpler since we then always get a parent window as argument that we can activate and get a focus object from. Change-Id: Ie3866b5664294f9aa4d694fa422e8116e9c75ced Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: add support for submenusRichard Moe Gustavsen2014-09-252-11/+35
| | | | | | | | | | Change-Id: I3816f2518125ad9c013ab578853295bf2c6bd02e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: don't show separator in native menusRichard Moe Gustavsen2014-09-252-2/+9
| | | | | | | | | | | | | | | | There might be menu types later that should show them, but for now we just hide them. Change-Id: Iac31e3204d8dcfd5beb5a2d5a372478ca811776c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Ensure a window with no stays on top flag is not staying on topAndy Shaw2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | On Windows, if a window was previously staying on top then it needs to be explicitly told to have HWND_NOTOPMOST set when it is recreated. If it was not staying on top before the flag has no effect so it is safe to always set it in this case. Task-number: QTBUG-30359 Change-Id: I8be546886d6ae61032113c241f5903bcce04c163 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Update license headers and add new license filesMatti Paaso2014-09-24545-10169/+5809
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | iOS: Don't update screen properties for statusbar frame while rotatingTor Arne Vestbø2014-09-242-0/+27
| | | | | | | | | | | | | | | | | | | | The rotation will already result in laying out of the root viewcontroller, so we don't need to send explicit geometry changes for the statubar change. The properties of the screen at that point are also not consistent, as the screen is about to rotate. Change-Id: I1b45bee1c1224ca56f9e37068d68c4ee1bfeb9b6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Reflect changes in statusbar height as QScreen availableGeometryTor Arne Vestbø2014-09-241-0/+36
| | | | | | | | | | | | | | | | | | | | | | We detect changes to the statusbar height, eg. when the in-call 40px tall statusbar is active, and ensure that the root viewcontroller view is laid out again with new screen properties applied. To make the layout match the animation of the statusbar height we apply the layout inside a animation block. Change-Id: I751d9d1273e833ef052a3a4f3d2777e1dffec7dd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Fix touch point translation when root view controller is offsetTor Arne Vestbø2014-09-241-13/+16
| | | | | | | | | | | | | | | | | | | | Instead of doing manual translation of the local touch point to global screen (QScreen) coordinates we take advantage of the fact that QWindow already has a position that's adjusted for all of the view-controller offsets in its parent hierarchy. Change-Id: Ib34173db5ac053c20712dfff469c4a1286f2a324 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Simplify QWindow/UIView geometry mappingTor Arne Vestbø2014-09-242-32/+2
| | | | | | | | | | | | | | | | | | As we now have a root viewcontroller that always has a geometry that matches the containing UIWindow, we don't need to do any fancy calculations when mapping between the two. Change-Id: I08a7b9992be7b7238cbad2a2da20488bba1c0939 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Ensure root view controller always matches size of containing windowTor Arne Vestbø2014-09-241-0/+35
| | | | | | | | | | Change-Id: I249d847a1f4785b3e63e46759baed340b0d6362e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Move top level window management out of QIOSScreen to ↵Tor Arne Vestbø2014-09-243-34/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | iOS: Update screen properties more consistentlyTor Arne Vestbø2014-09-241-5/+2
| | | | | | | | | | | | | | | | | | | | | | Instead of updating screen properties (and hence laying out top level windows) in willAnimateRotationToInterfaceOrientation, we do it in the more catch-all viewWillLayoutSubviews, which also handles changes to the orientation while the application is in the background, as well as changes to the statusbar frame/size, eg. while being in a call. Change-Id: Ib4a08af2f3a56db426a10ff1ed819867895b5a5a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | iOS: Scroll root view when keyboard is visible using sublayerTransformTor Arne Vestbø2014-09-241-7/+28
| | | | | | | | | | | | | | | | | | We opt to use sublayerTransform instead of changing the root view's bounds, so that we can keep the root view at the same position and size regardless of statusbar height and visibility. Change-Id: I3f04a4587f1108084208aefa990f91a130fb47b8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Windows: devicePixelRatio aware QWindowsTheme::standardPixmapAlessandro Portale2014-09-241-4/+10
| | | | | | | | | | | | | | | | | | | | QWindowsTheme::standardPixmap() takes a size parameter which is in user space coordinates. This patch causes it to calculate the size in device pixels, to get the image from the OS in the correct resolution and to set the devicePixelratio of the returned pixmap accordingly. Change-Id: Ifad5d0a26d5fd5945e37e432787d63ee79269295 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>