summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
...
* Cocoa: Speed up fading out scroll bars.Christoph Schleifenbaum2012-10-152-16/+18
| | | | | | | | This patch replaces QDateTime usage with msecs since epoch to calculate scroll bars opacity. This eliminates lots of QDateTime::msecsTo calls. Change-Id: Ic0c26806660c192c5fc6de0dafd86b4200e3cb4c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QCommonStyle: Reduce code duplicationKonstantin Ritt2012-10-141-39/+23
| | | | | | | | | | by re-using viewItemTextLayout() helper function. Also use QTextLayout(QString, QFont) c-tor which is a bit faster than using setText() + setFont() setters. Change-Id: I0d09ba43bad2296e932f49fcb9cfd28f42c1f95d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove unused private headerJens Bache-Wiig2012-10-131-82/+0
| | | | | | | | This was a leftover after removing motif style from the repo. Change-Id: I98d47a9443ffce2be34d73e779a0787c0b68913f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QGtkStyle: fix a warningMarc Mutz2012-10-131-1/+0
| | | | | | | | | | | | | | | Commit c0893962ef94f12594f936ef2a50db6d0328eca0 added two definitions of a variable named gtkToggleButtonStyle in nested scopes. Because of name lookup rules, the second one wasn't initialised with the first one, but with itself. This leaves the second gtkToggleButtonStyle uninit'ed. Simply remove the surplus declaration, leaving the name to the original declaration. Change-Id: I2269e1093f54643ff4dce27b39cc033db6697782 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QGtkStyle: use gtk_widget_get_style()J-P Nurmi2012-10-103-99/+118
| | | | | | | | Do not access GtkWidget::style directly, it doesn't exist in GTK3. Change-Id: I947776848f5dd64011a40446fcdb9079f295f182 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: use gtk_widget_get_parent() and gtk_widget_is_toplevel()J-P Nurmi2012-10-103-2/+10
| | | | | | | | | GtkWidget::parent does not exist in GTK3, and GTK_WIDGET_TOPLEVEL has been deprecated since GTK 2.20 - > use gtk_widget_is_toplevel() (available since GTK 2.18) instead. Change-Id: I0f082b2d69a795cadb321802f25c9993029f6865 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: use gtk_widget_get/set_allocation()J-P Nurmi2012-10-103-17/+39
| | | | | | | Do not access GtkWidget::allocation directly, it doesn't exist in GTK3. Change-Id: I8ce69fab19ce8f3afe35d0d30d4e28b0348fdaf1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: cleanup unused gdk_drawable_get_depth() (not avail in GTK3)J-P Nurmi2012-10-092-7/+0
| | | | | | Change-Id: Ifc04c768dcadc48d459eeb8dd95325823cc44dcd Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* styles.pri: tabs to spacesJ-P Nurmi2012-10-081-69/+69
| | | | | Change-Id: I164368222d89ec2dc557bec02840f1d208e8f276 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QMacStyle: use proper pimplJ-P Nurmi2012-10-053-47/+66
| | | | | | | | | QMacStylePrivate needed to be revised in order for it to have access to QCommonStylePrivate that is planned to manage style animations in a generic fashion in the near future. Change-Id: I03185ae210d2cfc253a236d6b2da35d0201f7e13 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac: Safely dispose of scrollbars temporary NSGraphicsContextGabriel de Dietrich2012-10-041-0/+3
| | | | | | | | | | | | When rendering transient scrollbars, we instanciate a specialised NSGraphicsContext since those need non-opaque rendering. This context is being used as current context, but it was never properly released and the previous context never properly restored. Task-number: QTBUG-27327 Change-Id: I4e867e64a09368dbe64b84b17f07fd8e57bbae24 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Remove Cleanlooks as a dependency of QGtkStyleJens Bache-Wiig2012-10-025-96/+694
| | | | | | | | | | | | | Since we no longer do the sanity checking against gtk-qt-theme at startup, there is no longer any need to inherit from cleanlooks. Cleanlooks should no longer be needed as it has been completely replaced by Gtk style and this dependency is not required at this point. Change-Id: I05b59278cd3ff915df49a7ad2d04494258db0d42 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac: Fix label margins in QGroupBoxGabriel de Dietrich2012-09-281-17/+21
| | | | | | | | Also use mini-sized checkbox and label when checkable. This looks better when there are several group boxes on the same dialog. Change-Id: I69bb0240f2a6725afb9819d20696ca404be0bca7 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac: Fix small glitch in editable combo boxesGabriel de Dietrich2012-09-271-1/+1
| | | | | Change-Id: I4b064116183834226372b14c3c442dcaa518c3b4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Better drawn 1-pixel thick splitter on MacGabriel de Dietrich2012-09-271-9/+19
| | | | | | Change-Id: I72effdfb997a7733fbbd270db719c163d1d53a66 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fixed selected menu item (& Co.) text colorGabriel de Dietrich2012-09-271-1/+1
| | | | | | | | On Mac, highlighted text remains the same color as normal text. That's not the case for menu and combobox items. Change-Id: I3efe2547413f77921524b833b4b10cf2d533e110 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fixed text rendering in selected tab buttonGabriel de Dietrich2012-09-271-3/+10
| | | | | | | | We resort to custom Qt rendering when selected since it looks better than using Carbon's HITheme engine. Change-Id: Iefcc2bebb1ba58d0d99f078c4960c5126542f637 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* More consistent dock widget painting on WindowsJens Bache-Wiig2012-09-272-32/+12
| | | | | | | | | | | | | Before we would draw dock widget handles on windows classic and no handles on XP, Vista and Windows 8. This would make it very hard to make a consistent look and feel across those styles. I also added a workaround to avoid the redundant toolbar borders when they are used outside of the toolbar areas. Change-Id: Ib703453677fcac8d51b2180abe45527297af0a80 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-2715-3106/+12
| | | | | | | | | | | | | | | | | 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-262-0/+201
| | | | | | | | | | | | 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-2261-1454/+1454
| | | | | | | | 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>
* QGtkStyle: remove an unnecessary sanity check for theme nameJ-P Nurmi2012-09-221-4/+1
| | | | | | | QGtkStyle was unable to detect the current GTK+ theme. Change-Id: Ifd816e044bb8294f4ee2e3598ff53eb7cbce6064 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Replace QStyleOptionViewItemV? with QStyleOptionViewItemStephen Kelly2012-09-218-77/+76
| | | | | | | | | | The former are a typedef for the latter in Qt 5. This only touches internal implementation, as the API was migrated long ago. Change-Id: Ided73021ebecc00508e6325c3d988b6c6ad336cd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-141-2/+2
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>