summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix several unused warnings for misc disabled featuresStephan Binner2017-04-041-0/+2
| | | | | Change-Id: Id42daf684abeeb888155d65eca143150d9c5f5a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix build with -no-feature-animationPaul Olav Tvete2017-01-301-0/+4
| | | | | Change-Id: Ieecb9cdbf4373e295148ae5b3d59c43aaf46175e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix style compilation with -no-feature-...Paul Olav Tvete2017-01-251-0/+2
| | | | | Change-Id: Ic7fadf0622f98d339322a4a1d4d5c36908f4f7f6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up style selection codeLars Knoll2016-11-291-2/+2
| | | | | | | | Turn styles into proper features and test for them using qtConfig/QT_CONFIG. Change-Id: I7e28785a46723364b90d8aa286f4d6e5ab085651 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-191-2/+3
| | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-1/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-1/+46
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/itemviews/qabstractitemview.cpp src/widgets/itemviews/qabstractitemview_p.h Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
| | * Windows style: Scale native metrics per monitorFriedemann Kleint2016-07-271-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native sizes returned by the metrics and theme functions refer to the primary monitor. They need adaption when showing on a secondary monitor with differing logical DPI. Introduce a helper function QWindowsStylePrivate::nativeMetricScaleFactor() to calculate the total factor. Task-number: QTBUG-49374 Change-Id: I34c843ff34108424e1ef0aafcf9f563d17ebbc89 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-2/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
| | * Enable testStyleOptionInit for all styles and fix affected styles.Hannah von Reth2016-06-061-2/+1
| | | | | | | | | | | | | | | Change-Id: I7cb759445342ecb58d5187ddd4a22e41fdea084a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QtWidgets: Increase Windows API level to 0x600 (Windows Vista).Friedemann Kleint2016-05-171-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define WINVER, _WIN32_WINNT for MinGW in win.pri. Directly link to uxtheme and dwmapi and remove dynamic loading of functions that are present in Windows Vista onwards. Remove duplicated declarations of constants that are now present in the SDKs. Task-number: QTBUG-51673 Change-Id: I695a6673d7250b2788fd2f20aebd222fcabb0d47 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-111-18/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * | QtBase: use erase and std::remove_if with QList and QVectorAnton Kudryavtsev2016-04-081-6/+7
| | | | | | | | | | | | | | | | | | | | | ... instead of using removeAt in a loop, with quadratic complexity. Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-7/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| | * Windows XP style: Change theme logic to use qreal.Friedemann Kleint2016-04-051-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid rounding errors, thus preventing sizes becoming too small when High DPI scaling is in effect. Also fix division by zero crashes should a scale factor be below 1. Task-number: QTBUG-49374 Task-number: QTBUG-51552 Change-Id: I72718521bc3c7f6b0e42392ea2d2d3bbc61e2faa Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
| * | Widgets: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-061-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id1c39093199519f2794b11560c2c0ded2d52b928 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QtWidgets: Remove Windows CE.Friedemann Kleint2016-04-071-20/+5
|/ / | | | | | | | | | | | | | | | | Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-0/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * QtWidgets: includemocsMarc Mutz2016-03-181-0/+2
| | | | | | | | | | | | | | | | A very simple way to save ~3KiB in test size and 440b in data size on GCC 5.3 Linux AMD64 release builds. Change-Id: I6619148cc497116b9772a00e1bc30d573a2b2534 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: use new QRect::transposed()Marc Mutz2016-02-131-1/+1
| | | | | | | | | | | | Change-Id: Idfed0ae6b80e301fd32206b2e6d68054460b76de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* QWindows*Style: remove use of obsolete QStyleOption*V<N>Marc Mutz2015-11-041-18/+10
| | | | | | | They are obsolete since Qt 5.0. Change-Id: I59f8b30ec877c5124922ab12ef38fbe33a1ae6b8 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * WinRT/Winphone: Fix warnings in qtbaseOliver Wolff2015-05-181-4/+5
| | | | | | | | | | | | Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | QWindowsStyle: Do not rely on the widget to draw the dock titleOlivier Goffart2015-04-221-1/+1
|/ | | | | | | | | There is no need to query widget->isWindow when this information is present in the QStyleOption state (it is even set using isWindow in QStyleOption::init) Change-Id: I4f3bbdd9c70d6253e9301bc168d61c7ecdbfdc06 Reviewed-by: J-P Nurmi <jpnurmi@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>
* Avoid unneeded QBrush::texture() callsAllan Sandfeld Jensen2015-02-021-4/+17
| | | | | | | | | | | | If a QBrush has been created without QPixmap the texture() method will create one. This patch avoids that in several places by checking the type of the texture brush before accessing it, or not accessing it at all. Task-number: QTBUG-43766 Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QtWidgets: convert some users of QSize::transpose() to transposed()Marc Mutz2015-01-081-3/+1
| | | | | | | | ...because transposed() is inline (and transpose() is not), and because it makes the code more readable and compact. Change-Id: I5661ee6251be638fb40c5c748aa50a89de6f7735 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * QWindowsStyle: fix CE_ComboBoxLabel text colorJ-P Nurmi2014-10-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | CE_ComboBoxLabel was relying on a font color / painter pen set by CC_ComboBox. This change ensures that CE_ComboBoxLabel has correct color when CC_ComboBox and CE_ComboBoxLabel are drawn independently. Change-Id: Id548d831fdde5885bc7c157d55de6235ef3f0a56 Task-number: QTBUG-41702 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-2/+2
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Additional support for devicePixelRatio in CE_MenuItem’s icon paintingMihailNaydenov2014-09-301-2/+2
| | | | | | | | | | | | | | | | | | FusionStyle and MacStyle have this already, the change just brings it to the others. Task-number: QTBUG-40277 Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-19/+11
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Refactor the sloppy submenu logicJørgen Lind2014-09-161-0/+11
|/ | | | | | | | | | | | And enable the style to control the behavior of the sloppy submenus [ChangeLog][QtWidgets][QMenu] QMenu now pick up how "sloppy" submenus behave from the style Task-number: QTBUG-20094 Change-Id: Ib1a9770d9b63028033cc360ae236471449d00267 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Windows styles: Scale hardcoded-values according to DPI.Friedemann Kleint2014-09-051-54/+56
| | | | | | | | | Factor out functions to return the fixed values and scale those. Task-number: QTBUG-38993 Task-number: QTBUG-38858 Change-Id: I59c70a206eae76bf08bc2aeb5cda5a740cd3d6dc Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Windows styles: Add device pixel scaling for system metrics.Friedemann Kleint2014-09-051-71/+68
| | | | | | | | | | | | Metrics obtained from the system must be scaled down when device pixel ration scaling is in effect. Factor out functions to return the device pixel values which might still be used for drawing. Task-number: QTBUG-38993 Task-number: QTBUG-38858 Change-Id: I6b90629e4979436bbb46f8c1fa1ee2253ada7ece Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Fix radioButton height for Windows styleMaks Naumov2014-09-021-1/+1
| | | | | | Change-Id: I755ed32f7458fec0fcbc5243d25fb1f6ecf46492 Task-number: QTBUG-32420 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-111-1/+1
|\ | | | | | | Change-Id: Ib8cfeee7d9ca15e8ad520e428b72c200827a8628
| * Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | WinRT: Fix Widget buildsAndrew Knight2013-09-271-8/+12
|/ | | | | | | | Tweak pri files and preprocessor usage to support widgets under WinRT. Change-Id: I6dc7d160078c0da343d6d39d2a0d52112c6f9f59 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows style: Support underlined mnemonics from Qt Quick ControlsGabriel de Dietrich2013-09-121-0/+6
| | | | | | | | We use the usual accessibility + private property combo pattern. Task-number: QTBUG-33030 Change-Id: I7fbb704c949ff2df163536534f6f46d2e226402d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make password mask characters themeable.Mitch Curtis2013-04-191-15/+0
| | | | | | | | Task-number: QTBUG-29871 Change-Id: I3cf739a321d7917f8f8431992e29bba0871b1934 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-191-1/+1
| | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix sizeHint for QAbstractSpinBoxCaroline Chao2013-02-121-1/+0
| | | | | | | | | | | | | | | | | | | The current size hint is not correct and the text is truncated when using prefix/suffix. Update QCommonStyle::sizeFromContents() to get the button and frame widths into account for the QSpinBox width. Update sizeFromContents() in the different styles to be consistent with the change in QCommonStyle. Update minimumSizeHint(), calculate it using the prefix and data range. The SpinBox can shrunk over the suffix if any. Task-number: QTBUG-28863 Change-Id: Ia742232edf8b11d0283e8136c2818928f8755103 Reviewed-by: J-P Nurmi <jpnurmi@digia.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>
* Made QWindowsStyle internalJ-P Nurmi2012-11-301-1/+2
| | | | | | | | | | | | | | | We will take this opportunity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsStyle directly. Change-Id: Ic17c7e425535bc5bb3a08620e9059bb0aea5185e Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Moving code for PE_IndicatorArrow* from windows to common styleThomas Hartmann2012-11-261-74/+0
| | | | | | | | If QCommonStyle is taking the place of a common base style, it should support PE_IndicatorArrow*. Change-Id: Iec08a37bf3a501bcca61751b11e907999f538e34 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-1/+1
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>