summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstheme.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| * QWindowsTheme::themeHint(): Handle special value of SPI_GETWHEELSCROLLLINESFriedemann Kleint2016-07-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | When the mouse wheel step is set to "Scroll one screen", querying SPI_GETWHEELSCROLLLINES returns the special value unsigned(-1). Return the default instead of converting it to int in that case since Qt does not implement it. Task-number: QTBUG-52384 Change-Id: I793e5c09103fe0c7c4a378aba97e9f63ae1c2f35 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-12/+37
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| * QWindowsTheme: Fix the available file icon sizesFriedemann Kleint2016-07-151-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, QWindowsTheme had a hardcoded list of of available file icon sizes. As the sizes depend on the Windows display scale factor, this can lead to undesired scaling of icons. Maintain an array of the standard sizes against which the sizes are matched; refresh in display change. Task-number: QTBUG-54561 Change-Id: If36de2f30c8a230cc7bd8eeb4dfc9f201aeda5e4 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-1/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * QWindowsTheme: Suppress error dialogs when calling SHGetFileInfo().Friedemann Kleint2016-05-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | Set the error mode flag SEM_NOOPENFILEERRORBOX when calling Win32 API SHGetFileInfo() to prevent it from prompting to insert media as does QStorageInfoPrivate::mountedVolumes(). Task-number: QTBUG-32457 Task-number: QTBUG-48823 Change-Id: I01a2f99b5a75b39dd729509ca319f634e3dcd695 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-8/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| * QWindowsTheme::standardPixmap(): Do not create pixmaps with DPR.Friedemann Kleint2016-04-201-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The given size is mostly ignored and the resulting pixmaps typically end up in a QIcon, which will clobber the DPR anyways when returning a pixmap for a given size. Moreover, returning a message box icon with a DPR > 1 when high DPI scaling is active and Qt::AA_UseHighDpiPixmaps is not set causes the pixmap to become too small due to some scaling error. Task-number: QTBUG-52622 Change-Id: I8aaaa97667d6c168040e19b7edad9dfb7517f70f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-291-11/+45
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
| * QWindowsTheme: Run SHGetFileInfo() in a thread.Friedemann Kleint2016-02-261-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Windows 10: SHGetFileInfo() (as called by item views on file system models has been observed to trigger a WM_PAINT on the mainwindow for totally obscure reasons, causing a recursive repaint. Suppress this by running it via QThreadPool. Task-number: QTBUG-45298 Task-number: QTBUG-48823 Task-number: QTCREATORBUG-14888 Change-Id: I7479102b9b8fb0771681260298c3d735e66f220f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-4/+7
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-191-4/+7
| | | | | | | | | | | | | | | | Code except font, accessibility and file qwindowswindow.cpp. Task-number: QTBUG-50804 Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-29/+0
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * Windows QPA: Remove dead code as detected by Clang.Friedemann Kleint2016-02-051-29/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-50804 Change-Id: Id87ca4ac98eb17b1e743a10080554da38d609588 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@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>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-2/+2
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * QWindowsTheme: Fix return type of helper dWordSystemParametersInfo().Friedemann Kleint2016-01-041-2/+2
| | | | | | | | | | | | | | | | QApplication::wheelScrollLines() was always 1 due it being a bool. Task-number: QTBUG-49561 Change-Id: I83e97da3507c31dfd024db7bf543c4e6a3b4a98b Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | QWindowsTheme: Preferably obtain stock pixmaps via SHGetStockIconInfoFrank Richter2015-12-241-12/+41
|/ | | | | Change-Id: I5dd958ce572a34f5ccf0d9df2a93486cc68c527b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Implement QPlatformTheme::WheelScrollLines.Friedemann Kleint2015-11-201-0/+2
| | | | | | | | | Obtain the system setting via SystemParametersInfo(), amending fac71528cce279282d66b0a96ddd8570d567955f. Task-number: QTBUG-49561 Change-Id: Ie7a956fdc6b175ad09356949645c1e8937053abd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* qwindowstheme.cpp: Fix compiler warnings by MSVC2015 (64bit).Friedemann Kleint2015-08-011-1/+1
| | | | | | | qwindowstheme.cpp(635): warning C4312: 'reinterpret_cast': conversion from 'int' to 'FakePointer<int> *' of greater size Change-Id: Ia2b7c14a5f31bd29243302e76105ad97563951b2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Highdpi changes for WindowsFriedemann Kleint2015-07-301-1/+3
| | | | | | | | | | Adapt the Windows plugin to work with the new cross-platform high-DPI scaling. Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Revert "Add devicePixelRatio support to the Windows QPA plugin."Friedemann Kleint2015-07-291-2/+1
| | | | | | | | | This change reverts c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 . Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I180dcac3a65a33498b90a71bbcad5e45a12af77c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Introduce QT_NO_WINCE_SHELLSDK for WEC builds.Bjoern Breitmeyer2015-07-061-0/+2
| | | | | | | | | | ShellSDK isn't always available in WEC2013 and sadly the define that should tell us if it is isn't enough as the headers would be in the SDK but the lib doesn't need to have the symbols. Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Clean headers in the Windows plugin.Friedemann Kleint2015-03-051-0/+11
| | | | | Change-Id: Ibc6b904e6e0b21f5daa0730a7eda2cae43cd3dcf Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@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>
* Windows: fix obvious mistyping in getSysColorSergey Radionov2014-09-241-1/+1
| | | | | Change-Id: I1f215cdf17d85119535df35bbff1ee653ecc0ad5 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Windows: Add missing colors to tooltip palette.Friedemann Kleint2014-04-251-1/+5
| | | | | | Task-number: QTBUG-38183 Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Consolidate StandardButton, ButtonRole and related static functionsShawn Rutledge2014-02-151-1/+1
| | | | | | | | | | Moving them into QPlatformDialogHelper for the convenience of both widgets and QtQuick.Dialogs. The main reason is to ensure that QtQuick.Dialogs does not need to depend on the widgets module, in order to re-implement the button box concept in a generic dialog. Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Remove rarely used integration/theming logging categories.Friedemann Kleint2014-01-151-9/+0
| | | | | | | | Preparing the introduction of the categorized logging system for the plugin. Change-Id: I2b180d88cf508559f495d39d4e1d36b8f3da7051 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows: Show context menu on mouse release.Friedemann Kleint2013-12-101-0/+2
| | | | | | | | | | Introduce a hint to QPlatformTheme to control the behavior. Task-number: QTBUG-35231 Change-Id: Ia28e153a8dd3f1931321a222d8906ca87166ed62 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-101-0/+6
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-0/+6
| |\ | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Fix compilation with latest Mingw-w64 headersKai Koehne2013-09-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation with e.g. mingw-builds 4.8.1-rev4 package. The Mingw-W64 headers define SHSTOCKICONINFO only for vista and newer. Task-number: QTBUG-33225 Change-Id: I30a62c642ae017c7eafb99b1efb06578fd61a12e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Fix build on MinGWKonstantin Ritt2013-09-091-1/+3
| | | | | | | | | | | | | | | | | | | | | Issue introduced in 87ff0af425656d12c4766a57db60674d63ffa584 . Change-Id: Ifa9a7bd5af63b1462b4c2cf5e0715962bbcd74b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Be pedantic with Window's icon indexes.Sérgio Martins2013-09-081-4/+4
|/ / | | | | | | | | | | | | | | | | | | Documentation for SHFILEINFO says iIcon is an index, so lets initialize defaultFolderIIcon with -1 so it doesn't clash with some icon that might exist at index 0. Change-Id: Ic16538ee62e5433f3cdcceee19eb5d8d18d55c1e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Windows: Added support for large icons to QFileIconProvider.Friedemann Kleint2013-09-061-6/+77
| | | | | | | | | | | | | | | | | | | | Added code using image lists to windows theme. Initial-patch-by: Max Desyatov <max.desyatov@gmail.com> Task-number: QTBUG-4970 Change-Id: I6e82f4edec60e456d0b1759bb1771955edb94491 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Remove qFill from the Windows platform pluginGiuseppe D'Angelo2013-09-051-4/+6
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I777fc28857cc104fcd2b6c313a2840b697361be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Don't run this code on WinCE, the variable will be unused.Sérgio Martins2013-07-311-1/+1
| | | | | | | | | | Change-Id: Id472e6e18759227943a24aa723963671bdb52164 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add API to let applications integrate with the system fontsAleix Pol2013-07-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does 2 things mainly: - Adds a QPlatformTheme font type for fixed fonts. It's important because some OS provide specific monospaced fonts and we want to let our applications to use the preferred fonts by default. - Adds a new method and enum to QFontDatabase that expose the font types that applications might need, so that they can make the applications use the specific fonts that the system recommends. This data was already available within Qt through the QPlatformTheme, but it was not possible to use this data by Qt users. This new method exposes such data. Change-Id: Ic194c1e4bc07a70640672afd82ba756b87606985 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Windows: Introduce QFileDialog::DontUseCustomDirectoryIconsSérgio Martins2013-05-091-4/+19
|/ | | | | | | | | | | | | | | Folders can have a custom icon, set by the user. Some system folders also have one, for example c:\windows\fonts. This option allows you to disable this behavior, you'll get the folder directory icon. As a side-effect, you'll get a very big performance improvement on removable/network media: 2 seconds vs 60 seconds on a SDCard with 10000 folders. Change-Id: Id55ea628186e0a6523585ec7a4ff622d6f5da505 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make compile on WCE after c3b9398Kevin Funk2012-10-261-0/+2
| | | | | Change-Id: I594893eb80ecade903e592c41c7117b08bc946a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix compilation with MinGW-w64Jonathan Liu2012-10-171-1/+1
| | | | | Change-Id: I0c9e6adc54ccce34e0f81af048f2a51a4ac051b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPA: Introducing QPlatformTheme standardPixmap(), fileIconPixmap()Gabriel de Dietrich2012-10-161-0/+230
| | | | | | | | | | | | | | | | | | | | The basic idea is that the platform theme is now responsible for providing the pixmaps for the given standard name, or any file or directory. Then, the QStyle implementation should query the platform theme for the pixmaps, and build the icons accordingly using ThemeHint::IconPixmapSizes. Same thing for QFileIconProvider. This also opens future support for getting platform dependent pixmaps in QtQuick components. Also includes the implementation for the Cocoa (QCocoaTheme) and Windows (QWindowsTheme) platform plugins. Task-number: QTBUG-27450 Change-Id: I4e8406585d970a9af481be10f6643cf0abbc38a3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>