summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Mac: Reworking flat QGroupBox lookGabriel de Dietrich2012-11-261-15/+25
| | | | | | | | The line has been removed, giving a globally cleaner appearance. Also, the label font size has been increased to normal size. Change-Id: I3ef9d59ca54755c6fa158e943e4a6ce94eb05065 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Moving code for PE_IndicatorArrow* from windows to common styleThomas Hartmann2012-11-262-74/+74
| | | | | | | | 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>
* docs: mark QMacStyle internalJ-P Nurmi2012-11-261-0/+1
| | | | | | | | QMacStyle was made internal in 27aa41, but was accidentally left public in the docs. Change-Id: Id7841718af3a21bbbda3102858d1a11bccb8179b Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Fix color issue with sliders on Fusion styleJens Bache-Wiig2012-11-251-1/+1
| | | | | | | | We should not directly use the palette as it looks weird on mac. Change-Id: I2062bd43a8b28875330d9f8cc0eaa4069f3a43f6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Improved tri-state checkbox in Fusion styleJens Bache-Wiig2012-11-251-10/+15
| | | | | | | | | | | This changes the tristate checkbox to look more distinct from the disabled checkbox. Task-number: QTBUG-27661 Change-Id: If0921c91d27b62552cbcf86563eed1b75e800478 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Draw disabled QMenu items in inactive state in vista style.Friedemann Kleint2012-11-231-1/+1
| | | | | | | Task-number: QTBUG-27992 Change-Id: I4ed5661cfe0d0a10143224b73fbad6fac4927a37 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Made QMacStyle internalJ-P Nurmi2012-11-237-326/+320
| | | | | | | | | | | | | 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, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QMacStyle directly. Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Made QWindowsMobileStyle internalJ-P Nurmi2012-11-236-197/+198
| | | | | | | | | | | | | | 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, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsMobileStyle directly. Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Made QWindowsCEStyle internalJ-P Nurmi2012-11-236-166/+167
| | | | | | | | | | | | | | 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, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsCEStyle directly. Change-Id: I6b3c0554e7a2a4a5f0027f4ea1342fd332af89ad Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Made QWindowsXPStyle internalJ-P Nurmi2012-11-218-431/+433
| | | | | | | | | | | | | 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>
* Made QWindowsVistaStyle internalJ-P Nurmi2012-11-216-236/+236
| | | | | | | | | | | | | 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 QWindowsVistaStyle directly. Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Made QFusionStyle internalJ-P Nurmi2012-11-216-209/+210
| | | | | | | | | | | | | 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, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QFusionStyle directly. Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QProxyStyle: fix the base style assignment in constructorJ-P Nurmi2012-11-201-1/+1
| | | | | | | | | | Assign the baseStyle member before calling setParent(), because that will trigger ParentChange event and thus calls ensureBaseStyle(). The baseStyle member must be set at that point, because otherwise it will start creating a fallback base style. Change-Id: I3522e41bb6b82e3fe2e7790d53a53978c18a027a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Made QGtkStyle internalJ-P Nurmi2012-11-208-587/+588
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example some styles could be even separated out of QtWidgets and be provided as plugins instead. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QGtkStyle directly. Change-Id: Iea1f7ebc80949d29f02733f81674355578e2e4fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix namespaced buildOswald Buddenhagen2012-11-161-0/+2
| | | | | Change-Id: I7ac3f3dc2057914108876241883cf8c7e30d2c33 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add feature to enable rounded line edit on macJens Bache-Wiig2012-11-152-2/+4
| | | | | | | | This will not currently be exposed in the widget API but we can make use of it for qt quick components. Change-Id: I08300a3bcd58e68df633fe9b36a988eb6176ef9c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Improve highligted colorization on mac with Fusion styleJens Bache-Wiig2012-11-152-3/+27
| | | | | | | | This mimics the platform behavior of using blue color when the system palette is in use. Change-Id: I9ad6a552614a3466a930ad5b28fc70d9343d2022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac: add runtime check for not calling preferredScrollerStyle on 10.6Teemu Katajisto2012-11-141-0/+1
| | | | | | | | | Task-number: QTBUG-27915 Task-number: QTBUG-27913 Task-number: QTBUG-27911 Change-Id: I1da49c5a1455b30335dec53921a35dc09cd27aa4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Refactor and cleanup QGtk(2)PainterJ-P Nurmi2012-11-109-979/+1213
| | | | | | | | | | Move all the GTK2 specific function resolving and painting routines to QGtk2Painter. A GTK3 specific and Cairo based QGtk3Painter will be introduced later, and it will be QGtkStyle's job to choose between the two. Change-Id: I2c8a85de0cf8187468798cf5faff0006da4b9623 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac: More accurate focus maskGabriel de Dietrich2012-11-091-4/+5
| | | | | | | Small artifacts were visible when tabing in and out QLineEdits several times. Change-Id: I56334e0534c67c94d357e3517d2470adcc1d8a1c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix warnings about unused variables in stylehelper.Friedemann Kleint2012-11-091-0/+3
| | | | | Change-Id: I6f18fff5277a95301a525209b7d45f0d4f182b97 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: GTK3 compatible gtk_adjustment_new()J-P Nurmi2012-11-082-5/+4
| | | | | | | | | In GTK3, gtk_adjustment_new() returns GtkAdjustment* and there's no such thing as GtkObject anymore. Just typedef the function pointer appropriately and as a bonus we'll save ourselves from the casts. ;) Change-Id: I2f17ab10b835dd0bffabb86345488e84aea51f3c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: remove references to gtk_progress_configure()J-P Nurmi2012-11-073-6/+0
| | | | | | | gtk_progress_configure() is deprecated and no longer exists in GTK3. Change-Id: I02d58456285326b8aee6050da1a155cacbb86eee Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: GTK3 compatible combo boxesJ-P Nurmi2012-11-063-19/+24
| | | | | | | | | | | | Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not available. The latter was deprecated since 2.24 and is no longer available in GTK3. Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas the old gtk_combo_box_entry_new returned a GtkComboBoxEntry. Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: GTK3 compatible type checkingJ-P Nurmi2012-11-062-5/+5
| | | | | | | | | | | - GtkType -> GType - GTK_CHECK_TYPE -> G_TYPE_CHECK_INSTANCE_TYPE Both are deprecated aliases in GTK2 and do not exist in GTK3. Change-Id: If2dc4ba09451cabb6730f8b23e15db7554a9f829 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: handle focus & default widgets in GTK3 compatible wayJ-P Nurmi2012-11-063-20/+70
| | | | | Change-Id: Ib4409c15599953a6626738543b27d14d711e7109 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* De-inline some destructors in QtWidgetsMarc Mutz2012-11-068-0/+34
| | | | | | | | | | | | | | | | | | | | | | Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QGtkPainter: use gtk_widget_get_style()J-P Nurmi2012-11-051-1/+1
| | | | | | | Do not access GtkWidget::style directly, it doesn't exist in GTK3. Change-Id: I1ee4ad5ca0894c9277219fc2a70f5f1c69ec632f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWindowsVistaStyle: Restore altered brush origin.Friedemann Kleint2012-11-051-0/+2
| | | | | | | | | | | The line to restore it was missing, and the leftover variable caused a warning, which was removed in abe5a0a432116963d22c4ef501a4dfd2393d66fb . Task-number: QTBUG-27828 Change-Id: I00b8b89b07bec38a1660c3a9c61220b6d0d7eb48 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Doc fixes.Frederik Gladhorn2012-11-031-2/+0
| | | | | Change-Id: Id2042c33a9762261756d1065781005dfef341797 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Mac: refactor scrollbar animationsJ-P Nurmi2012-11-026-219/+104
| | | | | | | | | Get rid of QWidget-centric QMacStyle::eventFilter() and implement the fade out animations for scrollbars using QNumberStyleAnimation-based QFadeOutAnimation. Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make it possible to use mini and small size on mac without widgetJens Bache-Wiig2012-11-022-18/+20
| | | | | | | | We need to add the styleoption when evaluating the small and mini size hints. Change-Id: I00f8709912aa2202caef4dbdeaebb5d67cc9a9b4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix progressbar animation on macstyleJens Bache-Wiig2012-11-021-1/+2
| | | | | | | | The animation is not just supposed to run when indeterminate, but also while it is progressing. Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix height of combobox in macstyle without a widgetJens Bache-Wiig2012-11-021-0/+1
| | | | | | | | When no widget is provided we hardcode the height and the value was off by 2. There is no change when a widget is provided. Change-Id: I555b5206b8750db06595a1e2572a3f8212635a9d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QWindowsVistaAnimation: inherit QBlendStyleAnimationJ-P Nurmi2012-11-022-131/+10
| | | | | Change-Id: I15b348eb842730513480ecbb90bca87174d7c771 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Introduce QBlendStyleAnimation (based on QWindowsVistaAnimation)J-P Nurmi2012-11-022-1/+132
| | | | | Change-Id: Ie289debe69ea7f6bb7833f979e39bb91290cc49c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix font and positioning of headerview labels on macJens Bache-Wiig2012-11-021-8/+16
| | | | | | | | | | | | | The old code rendered text too large. On desktop components, the widget workaround ensured that text was clipped. This should address both problems. Since we anyway do not adapt the height to font size, I dont se a point in supporting custom fonts here. Change-Id: If3c0509cdff4dbadfd98bd4b1934eaa665148cbf Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Some Vista style cleanupJens Bache-Wiig2012-11-011-25/+28
| | | | | | | | Creates a function for cloning the style options used by Vista style. Change-Id: I4d83661acd6bdfff5c633447046a206018b537af Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make ToolButton work with Macstyle for componentsJens Bache-Wiig2012-11-013-2/+22
| | | | | | | | | | We needed a new helper function for this. The widget cast was breaking desktop components. By using accessible role, we can make it work for both use cases without depending on the widget. Change-Id: Ic854dc45a4e5b7a50c5be701e903d58a4a914ee5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix groupboxes for desktop components on macJens Bache-Wiig2012-11-011-1/+1
| | | | | | | | | | The logic was a bit odd as it would check if the groupbox had a font set and then override it anyway. Since we anyway want the fallback to be used for components we just make sure that the fallback is to use the same code path. Change-Id: Ic5071b43cda76e2bb7356a6f71cc8458c4e8bf27 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix buttonsize on macstyle when no widget is definedJens Bache-Wiig2012-11-011-1/+1
| | | | | | | | | | | The previous size was incorrect and added far too much height when the widget was undefined. When it was defined it would get its size corrected so the patch should have very little effect on existing widget code. Change-Id: I7c22f4226eda270f0d71050bc4248686b035cb39 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix QCommonStylePrivate::stopAnimation()J-P Nurmi2012-10-301-7/+3
| | | | | | | | Make sure that QCommonStylePrivate::animation() does not return an animation that was already stopped. Change-Id: I35b7f8e0fabff9908f247b3632e35388e2c95a6d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add QNumberStyleAnimation for fading out scroll bars on MacJ-P Nurmi2012-10-302-0/+69
| | | | | Change-Id: I6a85ed069a418d62078af6490a3d3186d5599a95 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove some dead code in switch statementsSergio Ahumada2012-10-291-1/+0
| | | | | | | | | | Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove Windows as a dependency of mac styleJens Bache-Wiig2012-10-253-46/+103
| | | | | | | | | | There is not need to have this dependency any more since mac is overriding anything we depend on in Windows style anyway. Change-Id: I8fe0e0cc949265170947b492e04e08fdd4cf5027 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove widget dependencies on Vista style animationsJens Bache-Wiig2012-10-251-329/+350
| | | | | | | | This patch will make it possible to get animations on desktop components without using the widget pointer. Change-Id: I2d2eca111dab0d96f276ff3627505c0652c4b4e5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QStyleAnimation: writable duration & delay propertiesJ-P Nurmi2012-10-252-11/+35
| | | | | | | These will be needed by upcoming QFadeStyleAnimation and QBlendStyleAnimation. Change-Id: Ibc5092d5dbd834cb9b16353d3e83b95b04d9484b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMacStyle: make default button animations independent of QWidgetJ-P Nurmi2012-10-252-114/+62
| | | | | Change-Id: I63c078050288e3151a9c6aad5d4ae28a58afd84f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix widget borders when using global stylesheetstyleMiikka Heikkinen2012-10-251-9/+5
| | | | | | | | | | Recent fixes to stylesheetstyle caused not calling fixupBorder() when globalStyleSheetStyle is used. Task-number: QTBUG-27651 Change-Id: I73263c951e2db7d574e81da3f60a1b79f3852716 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Add QStyleAnimation::updateTarget()J-P Nurmi2012-10-232-4/+10
| | | | | | | | | For example a paused "default button" animation might want to update the target to get "non-default button" looks meanwhile the animation is paused. Change-Id: Ibb854a40f38a8971e7233b1f34a83056e6a9d827 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>