summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Removing duplicate includesSergio Ahumada2012-09-094-6/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlesslyOswald Buddenhagen2012-09-081-4/+2
| | | | | | | | these macros behave counter-intuitively, so don't use them unless the code structure really suggests their use. Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf Reviewed-by: hjk <qthjk@ovi.com>
* Use QStringList::join(QChar) overload where applicable [QtWidgets]Marc Mutz2012-09-071-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ia30048e0c40967dc86a4e4ad26ac02ab67519096 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fixed behaviour of mouse clicks for menu bars on WindowsOliver Wolff2012-09-073-10/+0
| | | | | | | | | As the behaviour described in the style hint seems to be default and working, it can be removed. Change-Id: Ia8d47cf187597ae48b9e42c3f98ef3d4c390db34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-9/+9
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QXxxStyle: override standardIcon() & layoutSpacing()J-P Nurmi2012-08-3125-160/+127
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* QStyle: make standardIcon() & layoutSpacing() virtualJ-P Nurmi2012-08-312-119/+14
| | | | | | | | Removes standardIconImplementation() and layoutSpacingImplementation() that were added in Qt 4 as a workaround for binary compatibility reasons. Change-Id: I45292dc6802310d6cda4f443bb7484b061af0138 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Drawing fix for overlay scrollbars on Mac.Christoph Schleifenbaum2012-08-291-1/+1
| | | | | | | | | A wrong check lead to a scrollbar with value 0 never been draw. This is the fix for it. Instead is has to be checked for a length of 0. Change-Id: I0c4e2f7e0014074e3c22554bcbea0ebfc3122952 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Clean up borders in cleanlooksJens Bache-Wiig2012-08-221-16/+5
| | | | | | | | | This aligns the dockwidget appearance in cleanlooks with that we use for Gtk style. It should look a lot cleaner this way as most of the borders were redundant. Change-Id: Idf20a105f583ca8cdbba0bcb6f22b298d53cc40d Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Remove icons from buttons with CleanlooksJens Bache-Wiig2012-08-211-7/+1
| | | | | | | | | | | | | | | | The icon buttons in cleanlooks were modeled after an early version of the Gtk 2.0 Clearlooks theme. At the time, GNOME was using icons on all buttons. For the past couple of years, GNOME has dropped icons on buttons by default and as this is the common behavior on other platforms as well, I think it is time to remove them. The button size hack was also removed due to previously emulating a GNOME behavior. The end result at the moment is only that it makes the button height inconsistent with other widgets. Change-Id: I22fe8c0b3a799a807cfff74a81cebf50e8ec33d3 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix a bunch of Mac/clang specific warningsJiang Jiang2012-08-211-5/+4
| | | | | Change-Id: I0ecc67d58fb7e727a88a5f546eeca01ff7554502 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove warning about non existing paint device engineTitta Heikkala2012-08-211-26/+28
| | | | | | | | | | | | | | The QWindowsVistaStyle::drawPrimitive() method was trying to draw the pixmap for an item in an item view even if the section width was zero or less then zero. This resulted "QPainter::begin: Paint device returned engine == 0, type: 2" error. It's now checked that the width and the height of the section is greater than zero before creating the painter. Task-number: QTBUG-26047 Change-Id: I36dd2792fd505be773951e5ac36b0e3362ec2292 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix multiple enumeration warnings when generating docsJens Bache-Wiig2012-08-202-17/+0
| | | | | | | | Most of these caused by cleaning up enums and not removing omitted values. Also removed some leftovers from qt3support. Change-Id: I75efcc9fadc6a430492bab36e86d7b345d3a6a17 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Replace deprecated ColorSync Manager use with updated CG APIJiang Jiang2012-08-201-9/+1
| | | | | | | | ColorSync Manager is deprecated in 10.6 and new CG API for copying color space is available since 10.5. Change-Id: I730431dcd28ca0ff6cec5d1eeff99fff9f3d0a29 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QtWidgets: use new qEnvironmentVariableIs{Empty,Set}()Marc Mutz2012-08-101-4/+4
| | | | | | | | | Incidentally, this patch shows that Qt isn't consistent in how it treats empty environment variables used as flags, but that is something for a separate commit. This patch aims to be behaviour-preserving. Change-Id: I5390cda314858762b76384291373a6f0167d323a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* change \img to \image in docsJeremy Katz2012-08-017-7/+7
| | | | | | | | \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>
* Fixup the plugin documentationLars Knoll2012-07-261-10/+9
| | | | | | | | | | Move the plugin howto from qtdoc to corelib where it belongs. Fix the snippets and remove all remaining references to Q_EXPORT_PLUGIN Task-number: QTBUG-26237 Change-Id: I43dce2ffa42193b7a992fa1a0f2fcb2f633037b2 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove obsolete TODO.Stephen Kelly2012-07-241-1/+0
| | | | | | | This will probably not be done in time for Qt 4.7. Change-Id: Ie9112cee021e31849f5b43eefb8eb57537d01a2d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QStyleFactory: remove unused typedef (GCC 4.8 warning)Marc Mutz2012-07-231-1/+0
| | | | | | Change-Id: I50ef91f4df3cdf1ae039dce269e37185eece6b8d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QTBUG-26296, dock widget movingJames Turner2012-07-231-1/+1
| | | | | | | | | | | | | | | Cocoa lacked implementation of FrameStrut events, and also frameMargins on QPlatformWindow. Fix both of these issues. Unfortunately QDockWidget also contains a tangle of #ifdef MAC behaviour which I am unclear about. What's included here disables some logic on Mac that seems definitely wrong - while moving a window on Mac we now generate NonClientArea events (as intended, I believe), but this should not cause dock-widget dragging to end. Note the window titlebar is the only frame-strut/non-client area on Mac (as far as I can see) Task-number: QTBUG-26296 Change-Id: Id0c6e954db64b9f9f71d16355cb92922877e5ebe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix crash on Mac OS 10.6 with new scrollbars.Christoph Schleifenbaum2012-07-131-10/+14
| | | | | | | | | | Add missing runtime for OS X version in constructor. This ended up in a crash when starting a version compiled on 10.7 on 10.6. Change-Id: I25c5562ee905317554e79d83a2f5236ce9e2a145 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove Library dependency on SettingsTasuku Suzuki2012-07-091-2/+2
| | | | | | | | made QLibraryInfo available with QT_NO_SETTINGS. QKdeTheme is removed when QT_NO_SETTINGS is defined. Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Support for overlay-scrollbars on MacChristoph Schleifenbaum2012-07-055-32/+419
| | | | | | | | | | | | | | | On Lion scroll bars are within the scroll area itself and are not being shown as long as the user is not scrolling. This patch draws the new scroll bars and makes them fade away. Further it introduces a pixel metric checking for this behaviour. It's used by QAbstractScrollArea to put the viewport to the correct place. Task-number: QTBUG-21673 Change-Id: Id530265043549318ac420b392de6b8642deaa4c6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-1/+67
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QGtkStyle build with QT_NO_FILEDIALOGSukhyun Kim2012-06-263-0/+12
| | | | | | | | Fix compilation failure with qconfig large Change-Id: I8ae14f01879b94430dcbb5c85c61d14e922f6eb9 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix docs mentioning Q_EXPORT_PLUGIN2Lars Knoll2012-06-251-1/+1
| | | | | | | | Fix all remaining places where Q_EXPORT_PLUGIN2 was being used in the documentation. Change-Id: I7be67b83c18545d0e74f250b4b26583444b01909 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* plastique: Use QPlatformTheme::DialogButtonBoxButtonsHaveIconsGirish Ramakrishnan2012-06-201-3/+6
| | | | | Change-Id: I2f493d45820063ef62f16febde0df89a874dddb0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove dead codeGirish Ramakrishnan2012-06-201-4/+0
| | | | | Change-Id: I48c1e3b2ebcf4ec2fb21ed2d1a88e1dae64e937d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QFactoryInterface from style pluginsLars Knoll2012-06-083-23/+10
| | | | | | Change-Id: I5c41f1c8b91b5e1117b9163c137de4bf5f51099c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QFileDialog crash on show with the GTK style.Morten Johan Sorvig2012-06-011-0/+4
| | | | | | | | Call createWinId on modal_widget to make sure it has a valid QWindow. Change-Id: Ieaec2bcaceb2ac28032cb42e5f8bcaf7a33828ca Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* QtWidgets: remove \link usagesGiuseppe D'Angelo2012-05-292-4/+2
| | | | | Change-Id: I9887a24485233f29d07054b3110d4db9e499b9f4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QCssParser: Remove temporary structure storing QIcon data.Friedemann Kleint2012-05-211-18/+5
| | | | | | | | | This is no longer needed after QIcon moved to QtGui. It is a revert of 5a0eb4e768435b9ce32b074e620fca33be4df2fb, compile fixes and uncommenting of commented-out code. Change-Id: I6cfe6d2582b3e37161862a28e55cc3b010e18a8b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QIcon: move back to QtGuiOlivier Goffart2012-05-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the files and tests git mv src/widgets/kernel/qicon* qrc/gui/image/ git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/ - update the include of QIcon git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon" git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon" - Adapt QIcon \ingroup documentation sed -i s/QtWidgets/QtGui/ src/gui/images/qicon* - Adapt export macro sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon* - Update .pri and .pro files - Remove the use of QStyle::alignedRect by copying its content (and adapt slightly - Use QGuiApplication::palette() instead of QApplication::palette() - Add a hook in QGuiApplicationPrivate to call the QStyle::generatedIconPixmap() from QtWidgets Another commit follows to adjust QMetaType::Icon and move the QVariant and QMetaType icon handler back in QtGui Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-113-4/+4
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Compile.Morten Johan Sorvig2012-05-101-0/+1
| | | | | | | | gtkstyle depends on x11. Change-Id: Ia056b5e63c1f1eedfa107f7622226e6a59dae894 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-106-37/+37
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Doc: Modularize QtWidgets documentation.Casper van Donderen2012-05-096-37/+37
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | No longer use deprecated methods for plugin loading.Friedemann Kleint2012-05-091-7/+10
| | | | | | | | | | Change-Id: I19c66b1c41ea4dd236726c86d7d071b210ec9244 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Fix typoFrederik Gladhorn2012-05-081-1/+1
| | | | | | | | | | Change-Id: I94a2b7e2b895c234e4520e0a9093a6af9bef3fbb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Expose QPA API under qpa/*Girish Ramakrishnan2012-05-074-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Vista style for use with QProxyStyle.Friedemann Kleint2012-05-043-3/+17
| | | | | | | | | | | Cleanup the treeview helper window in case XP style cleans the handle map. This fixes the drawing of the PE_IndicatorBranch primitives in Qt Creator. Task-number: QTBUG-25395 Change-Id: Iba561709e3d4032a59690c7b9163fb69bfa98619 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]Thiago Macieira2012-05-031-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Widgets: No longer use deprecated QPixmap::grabWindow(),grabWidget().Friedemann Kleint2012-05-011-4/+14
| | | | | Change-Id: Icf0d6a672edcfd1d3d10275bb9a93bde29251e79 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QGtkStyle work on Qt 5.Morten Johan Sorvig2012-04-303-10/+25
| | | | | | | | Mostly straightforward porting: Add configure test from Qt 4. Add X11 include to qgtkstyle_p.cpp. Use renamed QGuiApplicationPrivate::showModalWindow. Change-Id: I83020e13ec00b49f3fe346814f881bce19a6f602 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>
* Using QLatin1String instead of QLatin1LiteralDebao Zhang2012-04-252-5/+5
| | | | | | | | QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix unmatched double quote characterJonathan Liu2012-04-231-1/+1
| | | | | Change-Id: I25fb7dac38db2800ce974d40ec275d510f6d47f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>