summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiostheme.mm
Commit message (Collapse)AuthorAgeFilesLines
* QStyle: return 'Fusion' instead of 'fusion'Richard Moe Gustavsen2020-09-121-1/+1
| | | | | | | | | | | | This change should have no impact on Widgets, since style names there are case-insensitive. But for QtQuick controls the style names are case sensitive. So in order to use the style hint from the platform theme for controls, we need to return the name with an uppercase "F". Change-Id: I360f43f174938202b0ef2cdfcde6daf39c9f39bb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move CoreText font engine/database to QtGuiTor Arne Vestbø2020-05-271-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* iOS: Pick up theme palette from system colorsTor Arne Vestbø2020-04-301-4/+34
| | | | | | | | | | For now we just fill out the system palette, and react to the system changing theme from dark to light. A further improvement would be to fill in the control-specific palettes. Change-Id: I764db4415f5b55ccb193dae43e9f4386c765b30b Fixes: QTBUG-42944 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* iOS: Guard all uses of APIs not available in application extensionsTor Arne Vestbø2018-06-051-1/+2
| | | | | Change-Id: Ic058a0c07f6cdd0a015f46db96fce1536a712711 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-151-1/+1
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add support for Apple tvOSMike Krus2016-05-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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: add support for native message dialogsRichard Moe Gustavsen2015-11-161-0/+5
| | | | | | | This patch will add support for native message dialogs on iOS. Change-Id: Iba2237b371ccbdfe4c772d25c3ea925eb64e5a0c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: send arrow keys to Qt to handle cursor movementRichard Moe Gustavsen2015-09-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Controlling cursor position through input methods in Qt is very limited. You cannot e.g move the cursor vertically, or select text that spans several paragraphs. The reason for the latter is that Qt works with input methods on a per-paragraph basis, which effectively locks UIKit to only being able to move the cursor and select text within a single paragraph. Fixing up input methods to support more advanced navigation means changing the whole design (working on a whole document, instead of per paragraph), and is out of scope. Instead we choose to listen for arrow keys and forward them to Qt in the same fashing as we already do for backspace and enter. This will make the iOS port on-par with the other platforms, which also sends control characters like these on the side of IM events. Note that registering shortcuts and overriding default IM navigation behavior will only take effect when a hardware keyboard is connected. Only then will [UIresponder keyCommands] be called from UIKit. Change-Id: I634205e0578447c4aa6e9fdff342ee3b281901ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* iOS: add native file dialog for selecing photos/assetsRichard Moe Gustavsen2015-02-151-0/+22
| | | | | | | | | | | This will add a file dialog backend on iOS. The implementation will check if a dialogs initial directory points to the system picture location, and if so, present a UIImagePickerController. Otherwise it will return false upon show, which causes QFileDialog to use the widget based version as fallback. Change-Id: I276b630911652b6d28f60763decc7ec38f00c817 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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: add system paletteRichard Moe Gustavsen2014-10-081-0/+10
| | | | | | | | Return a system palette that sets the correct highligh (text selection) colors. Change-Id: Ic0a18f931913f28bdc73d9ec4ae347fe38839f17 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Implement support for native menusRichard Moe Gustavsen2014-09-231-0/+12
| | | | | Change-Id: I2c7278697499aa046ac7b1240b7bc713ad1fc709 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Font Database: Add support for private, system UI font familiesGabriel de Dietrich2014-08-111-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce QPlatformFontDatabase::isPrivateFontFamily() to allow testing for private, system UI font families. Both QFontComboBox and QFontDialog need to filter out those private font families which, by definition, should be hidden from the end user. (The textedit example had to be updated to fix the issue where the default font would be private. In 5.4, we will be adding an equivalent, public API in QFontDatabase, and a better solution for the textedit example and QTexEdit in general). In particular, on OS X and iOS, private fonts are used for the system UI font. Those have their font family name prefixed by a dot. QCoreTextFontDatabase knows about this, and makes sure those are tested positive as private font families. In order to have a cleaner layer separation, we moved the QPA theme font resolution from the platform theme classes into QCoreTextFontDatabase for both Cocoa and iOS QPA plugins. In both cases, we use CoreText's CTFontCreateUIFontForLanguage(), that nicely maps to the HITheme API we were using so far on Mac. That means one HITheme dependency less. We also cache the font descriptors we get for these font for each time QCTFD::populateFamilies() gets called. (While not common, this currently happens in auto-tests, like tst_QFontDatabase, and could happen in actual applications -- specially when adding and removing application fonts.) Change-Id: Ic6f0b60f9f597afee1a43596a669742dc546b97f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QPA/Mac: Fix resources leakingKonstantin Ritt2013-04-031-7/+7
| | | | | | | | | | | Having static QFont instance leads to a resources leaking, since QFontCache is unable to clean-up font engines when the application exits. Relates to QTBUG-25434 Change-Id: I71d91094de27c07ab2434c415e4c28b6acab3646 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* iOS: Make default system font HelveticaTor Arne Vestbø2013-02-271-0/+27
| | | | | | | | | | | | | | | | | | Without a platform theme implementatin we were relying on QCoreTextFontDatabase::defaultFont() to return the system font. This didn't work because it reported the system font that iOS reports, '.Helvetica Neue UI', which is a private font that does not get added to our font database. The result was that we picked the first font in the list of known fonts -- in this case 'Academy Engraved LET'. We now implement QIOSTheme::font(), which takes precedence over the font database's default font, and hard-code the system font to 'Helvetica', since Qt does not yet have the concept of private system fonts. Change-Id: I901cf9c2b662ea2795212376b84b8391be2efbbe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Make fusion style the default style on iOS, not the windows styleTor Arne Vestbø2013-02-271-0/+69
Change-Id: I81b6049ff666bf23ac58d60e10d7c3d8713a19ea Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>