summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsxpstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Windows styles: Avoid theme.rect recalculationMaks Naumov2014-09-081-1/+0
| | | | | | | | | In both cases theme.rect calculated right after the "sub & SC_ScrollBarSlider" test. Change-Id: I9fa0c4e1327e68b4184674a13e7a4bf362f8deff Reviewed-by: Adam Majer <adamm@zombino.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows styles: Scale hardcoded-values according to DPI.Friedemann Kleint2014-09-051-1/+1
| | | | | | | | | 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-172/+97
| | | | | | | | | | | | 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>
* Windows XP, Vista styles: Share dynamically resolved theme functions.Friedemann Kleint2014-09-021-82/+102
| | | | | | | | | | Extract a struct containing the function pointers and derive QWindowsXPStylePrivate from it, so that both styles can use them. Remove duplicated variables. Task-number: QTBUG-38858 Change-Id: I7c2c665b5930c56ffdf33c5185720f71517d146c Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.Friedemann Kleint2014-03-141-7/+14
| | | | | | | | | | | | | The old code tried to check the 2nd parent for inheritance from QAbstractItemView. This also triggers for line edits on a QDialog parented on the item view. Introduce convenience function that checks for top levels in the chain. Task-number: QTBUG-37504 Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-4/+4
| | | | | | | | | | | | | | | | | 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>
* Remove qFill from the Windows XP styleGiuseppe D'Angelo2013-09-051-1/+1
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ia5d4a6604a1ec8998d6cb4f03b4c0669a3d6b23f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove qSort from QtWidgetsGiuseppe D'Angelo2013-09-051-1/+3
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Iec5c10fc4c3b4e684b51f6223bf3cb56acc42b58 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Remove use of 'register' from Qt.Stephen Kelly2013-06-171-6/+6
| | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix GroupBox painting on Windows when not using widgetsJens Bache-Wiig2013-04-181-45/+2
| | | | | | | | | | | | | | This is simply removing some slow and rather ugly hacks that tried to reconstruct broken data from the windows xp theme. After testing without these hacks on both XP and Windows 7, I believe we can conclude that these workarounds are no longer required and even breaks our look and feel in several places. Task-number: QTBUG-29888 Change-Id: Ifaffd660e8d9ed6dfd43657745c3fa1606d33a7c Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
* 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 QWindowsXPStyle internalJ-P Nurmi2012-11-211-1/+2
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsXPStyle directly. Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06 Reviewed-by: Jan Arve Sæther <jan-arve.saether@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>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-271-1/+1
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix restore/minimize/close buttons for maximized MDI subwidowsMiikka Heikkinen2012-09-261-0/+95
| | | | | | | | | | | | The style code to display the restore/minimize/close buttons in menubar for maximized MDI subwidows was removed in Qt5 as it was incorrectly ifdeffed with just QT_NO_WORKSPACE where QT_NO_MDIAREA should also have been used. Brought back the removed code with proper ifdeffing. Task-number: QTBUG-27235 Change-Id: I89607dd54eec00329e576c72b0e8b997f37cdb29 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* QXxxStyle: override standardIcon() & layoutSpacing()J-P Nurmi2012-08-311-6/+6
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-011-1/+1
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix typo in name of included headerkb2012-05-071-1/+1
| | | | | Change-Id: If704c801d4d056a9d0294ded20f60ce99f83b2ea Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Windows: Fix a crash in Vista style.Friedemann Kleint2012-05-021-1/+2
| | | | | | | | | Do not query the paintDevice of a backing store that has not received a resize yet. Change-Id: I49bf8f7e85c092c5664e5bc507802bd2cd8b62ea Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows/Vista style: Fix painting of QGroupBox.Friedemann Kleint2012-04-271-16/+29
| | | | | | | | | | | | QGroupBox in Vista style does not show a frame, currently. drawBackgroundDirectly should also be called if the paintDevice is a backing store. Task-number: QTBUG-25395 Change-Id: Ifa20802dea6c182904f68271ddd0d175007e4b0e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix unmatched double quote characterJonathan Liu2012-04-231-1/+1
| | | | | Change-Id: I25fb7dac38db2800ce974d40ec275d510f6d47f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * Fix MinGW warning about qDebug() formats.Friedemann Kleint2012-04-131-1/+1
| | | | | | | | | | Change-Id: I927d17240a7cc7b88814601b0711aa46ca166ff9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-91/+135
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Windows: Replace QString keys of XP themes by an enumeration.Friedemann Kleint2012-04-041-93/+137
| | | | | | | | | | Change-Id: I5323e9ed5bc3fe73f278d167acae6fa744b0a299 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | Merge "Merge master into api_changes" into refs/staging/api_changesKent Hansen2012-03-231-1/+1
|\ \
| * | Merge master into api_changesKent Hansen2012-03-231-1/+1
| |\| | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| | * Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | Remove QWorkspace.Debao Zhang2012-03-231-97/+4
|/ / | | | | | | | | | | | | | | | | | | QWorkspace had been called Q3Workspace before Qt4.0 finally released. In a sense, it is a Qt3 support Widget. And QWorkspace has been deprecated and replaced by QMdiArea at Qt4.3. Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* / QtWidgets: Cleanup Q3* itemsDebao Zhang2012-03-201-12/+2
|/ | | | | | | | | Clear all the Q3* items away, expect QStyle::SH_Q3ListViewExpand_SelectMouseType which is still used by QTreeView. So simply removed Q3 from its name. Change-Id: Ia79f0283137b6751ba68791ae55df1d8bd7ea74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix QSpinBox background setting via stylesheetMiikka Heikkinen2012-03-131-2/+4
| | | | | | | | | | | | | | | | When using stylesheets, palette mask for drawing the background of line edit child of spinbox is already correctly resolved to style options in QStyleSheetStyle::drawPrimitive(), so we cannot simply ignore that mask and check the palette mask of the parent spinbox. Fixed by using a union mask of the parent spinbox palette and the palette supplied by style option instead of simply using the mask from parent spinbox. If either specifies custom base color, use that to paint the background of the spinbox's line edit. Task-number: QTBUG-24323 Change-Id: I1e738192db83b16d9bd48da54d29779e18788ef7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QPixmap::grabWidget() on Windows.Friedemann Kleint2012-03-021-2/+5
| | | | | | | | | | | | | | | Do not draw on the backingstore DC when drawing to a pixmap. Access the paintdevice for checking via the QPaintEngine since QPainter returns the clipdevice, which is a widget. Fix warning about accessing handle of 0-window in the test. Task-number: QTBUG-24183 Change-Id: Ie91ea6ab9d09528c7ec1d35633f9a0ee667719b1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows XP style: Fix warnings wrt retrieving HANDLE from 0-window.Friedemann Kleint2012-02-061-4/+5
| | | | | | | | Exclude invisible top level dialogs for whom a native dialog is being shown from top-level search. Change-Id: Ia94599905457d81d342c14d09ad0b0fc89ec4ab1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* WindowsXP-Style: Draw on DC of backing store for widgets only.Friedemann Kleint2012-01-271-27/+32
| | | | | | | | | - Check the device type pof the painter passed in. - Introduce convenience functions for retrieving the DC for widgets that default to the top level. Change-Id: I18a8db02c8ffd7a249310a5ffaf3a530f0a3df40 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Cleanup of QWindowsVistaStyle.Friedemann Kleint2012-01-261-26/+22
| | | | | | | | | | - Remove the limbowidget, try to obtain HWND from a toplevel or the desktop instead. - Clean up handling of the theme map, avoid operator[] and repeated invocation of of map.end() Change-Id: Ic5ea6186508f37aaff782ca304ce577899f7b41c Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Windows Vista Style: Fix drawing of buttons in message boxes.Friedemann Kleint2012-01-251-3/+2
| | | | | | | | | Do not use the HDC of the backing store when drawing to an image (as opposed to 4.8, where the HDC of the paint engine was used). This causes 'ghost buttons' to appear in the dialog box at 0,0. Change-Id: I301b66abf4447a65ee144f09655b68efaf18700d Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* qtbase: Warnings fixes.Friedemann Kleint2011-11-181-1/+0
| | | | | Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Move the documentation for the classes to their modules.Casper van Donderen2011-10-031-0/+1
| | | | | | | | | | | All documented classes under src/widgets should now be under the QtWidgets module in the documentation. The QtPrintSupport classes should now be under the QtPrintSupport module in the documentation. Change-Id: I236b15443b8b93a61578a1d10f52b64dba938f29 Reviewed-on: http://codereview.qt-project.org/5520 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Widgets: Remove QT3_SUPPPORT.Friedemann Kleint2011-09-281-10/+0
| | | | | | | | | | Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ie884f0cc9b3970b01c3c0c26600b1bcd92548077 Reviewed-on: http://codereview.qt-project.org/5629 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Readded (and fixed) WindowsXP and -Vista stylesOlli Werwolff2011-08-171-13/+56
| | | | | | | | | | There are still issues in WindowsVista style and qwizard_win's icon will not be shown but these will be fixed in upcoming commits. Change-Id: I22705694f07bea7461333b053804a09bab661706 Reviewed-on: http://codereview.qt.nokia.com/3073 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use PlatformNativeInterface to obtain backingStore's dcOlli Werwolff2011-07-121-7/+12
| | | | | | Change-Id: I6ec2fc0b8e7696fdfe4468920228df2d21c933fd Reviewed-on: http://codereview.qt.nokia.com/1501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use PlatformNativeInterface to obtain handlesOlli Werwolff2011-07-071-6/+31
| | | | | | | Change-Id: I8cdf3d5477e72e89bcde46ccb6670320bf4dd797 Reviewed-on: http://codereview.qt.nokia.com/1270 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use Q_WIDGETS_EXPORT for widgets libraryOlli Werwolff2011-06-081-1/+1
| | | | Reviewed-by: Lars Knoll