summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Fix the Mac build on 32bit with c++11Jocelyn Turcotte2013-05-231-8/+8
| | | | | | | | CGFloat is a float on 32bit and qreal is a double. This causes a narrowing error when building with c++11 support. Change-Id: Ia73378ff9798d1f547b37f97393564e2c9e3672d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QFusionStyle: fix highlight colorsJ-P Nurmi2013-05-231-2/+2
| | | | | | | | | Respect the current color group of the palette, and fix the inactive highlight color. Task-number: QTBUG-30034 Change-Id: Iddfc15a2dd98d4588c6c587b7aaf64d88538fa28 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Do not call g_type_init() with GLib >= 2.36Dmitry Shachnev2013-05-221-0/+4
| | | | | | | | g_type_init() is deprecated and the type system is now initialized automatically. Change-Id: I5bf5702136cc948dea0a55676dfee2486f12ca00 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Don't draw size grip on Mac > 10.6Jens Bache-Wiig2013-05-151-1/+5
| | | | | | | | | | | | | After Apple added the resize functionality to window borders, they stopped rendering the size grip in most apps. Hence we do not need to either. Since the status bar height depends on the status bar being there, we considered the safest option to keep it but make it hidden. Change-Id: Ida06e8f0de0f50d746a7d25bc5a472e22a370645 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMacStyle: fix transient scrollbar fade out animationJ-P Nurmi2013-05-091-1/+5
| | | | | | | | | | If a transient scrollbar was hidden during the fade out animation, it got stuck visible after being shown again. A regression introduced by f52177829a20b55624168870498947b28b82d220. Task-number: QTBUG-31060 Change-Id: I1cda16c6afa4370cce4702d3b4fdaee9f44f9ab9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Utilize the new Q_OS_MACX define.Jake Petroules2013-05-092-2/+2
| | | | | | | | | | All occurrences of `#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)` have been replaced with `#if defined(Q_OS_MACX)`. Change-Id: I5055d9bd1845136beb8ed1c79a8f0f2c0897751a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mac style: Fix text offset within 'small' comboboxGabriel de Dietrich2013-04-301-0/+2
| | | | | Change-Id: I2bde1c71e0e79a6d8ef2897acc053357b12dc00c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac style: Update appearance of 'button with menu'Gabriel de Dietrich2013-04-301-19/+69
| | | | | | | | | | Most of the logic was still following the 10.6 UI guidelines, and had not yet been upgraded to the 10.7 new button look. We tried to keep 10.6 compatibility were possible, and improve 'small' and 'mini' Aqua sizes support. Change-Id: I64139f24cccd095e9349b27a987395210b55c586 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Don't do any transitions if the widget is disabledAndy Shaw2013-04-251-1/+1
| | | | | | | | | | | | On Windows 8 it would end up changing the look of the QLineEdit when the mouse hovered over it even though it was not enabled. None of the Windows platforms show the lineedit changing when hovered over if it is disabled so we can skip the whole thing. Task-number: QTBUG-29224 Change-Id: Ib9495bf395477f114e91b744e1b1209c9e11f336 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make password mask characters themeable.Mitch Curtis2013-04-193-30/+4
| | | | | | | | 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>
* Mac: Fix warnings about non-existing native Windows on startup.Friedemann Kleint2013-04-181-5/+5
| | | | | | | Shown for example by Qt Designer. Change-Id: Ia866a93a781a027aa3703f44314954888d75d436 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Mac: Fix various memory leaksGabriel de Dietrich2013-04-181-0/+1
| | | | | Change-Id: Id554be11ffcf9a506c217b0dc5b96cb37c4dd57c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix GroupBox painting on Windows when not using widgetsJens Bache-Wiig2013-04-182-48/+3
| | | | | | | | | | | | | | 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>
* Fusion & GTK styles need to check direction from style option not qappShawn Rutledge2013-04-182-3/+3
| | | | | | | | | | An RTL menu containing a menu item which opens a submenu was showing the wrong arrow if the application's direction was not also RTL. So now the test for QTBUG-30595 can be simplified: no need to set the application direction, and therefore less chance of failure. Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Move Fusion styles palette into QtGuiJørgen Lind2013-04-171-39/+3
| | | | | | | | So that it can be used as the standard palette for QtGui applications instead of the absolutely useless black palette. Change-Id: Ie001439fcd8840a66275009c9f42cbf8bab4864a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QGtkStyle: Remove widget dependency from GroupBoxJens Bache-Wiig2013-04-161-18/+20
| | | | | | | | | | This patch makes it possible to draw a checkable groupbox without passing a widget pointer. Task-number: QTBUG-29867 Change-Id: I9b74bcffa0401c88f9dcbcd9816081b7f03a5173 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QGtkStyle: Try to get the theme name from GtkSettingsDmitry Shachnev2013-04-051-32/+6
| | | | | | | | Note that GtkSettings is already used for retrieving the icon theme name. Change-Id: I935d903c703f7d832b0350d3cfd3a638f22d1391 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: remove obsolete themeName != "Qt" checksDmitry Shachnev2013-04-051-12/+0
| | | | | Change-Id: Ibb6d952f6abc398ac5deb94d3bdfd8560777aa44 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix tickmark painting on Fusion styleJens Bache-Wiig2013-04-011-47/+49
| | | | | | | | | | The problem seems to be that Fusion assumed that tickmarckoffset was a fixed size, which probably changed when we moved the inheritance from Windows to CommonStyle. I also had to modify the paint order Task-number: QTBUG-30294 Change-Id: Ie7320c39fd572d39b641b6bd5a9db05f494f6b74 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac style: Fix disabled menu item palette entryGabriel de Dietrich2013-03-291-1/+1
| | | | | | | Also, removed an "magic color" form the style implementation. Change-Id: Iefd3ddc0d9d651d2b87f20eb1f9990a214b651df Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Support high-dpi pixmaps.Morten Johan Sørvig2013-03-281-10/+13
| | | | | | | | | | | | When Qt::AA_UseHighDPIImages is set images and pixmaps may be of the high-dpi type. Account for this when calculating layout sizes by dividing by devicePixelRatio() to go from device pixels to device-independent pixels. Change-Id: I977a86789f9097ebc3c3704ae76e9706f2cb79d8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Support high-dpi pixmaps and images.Morten Johan Sørvig2013-03-281-8/+13
| | | | | | | | | | | | When Qt::AA_UseHighDPIImages is set images and pixmaps may be of the high-dpi type. Account for this when calculating layout sizes dividing by devicePixelRatio() to go from device pixels to device-independent pixels. Change-Id: I8aa3d2ee947635ce2a49fff9e0029c9f55ae6c09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac style: Fix scaled clipping regions on retina displaysGabriel de Dietrich2013-03-281-1/+1
| | | | | | | Task-number: QTBUG-30311 Change-Id: Ic91fc6b2787a035292917c39d26b578dde0a6346 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make QMacStyle paint right side up again.Morten Johan Sørvig2013-03-281-4/+4
| | | | | | | | | 491dcbfac8 accidentally removed the y-axis inversion for the widget case. Move it back to the common code path. Change-Id: Ie6bbe6f442ca342347af77071da3a743b5655159 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac style: Remove suspicious assignmentGabriel de Dietrich2013-03-271-1/+0
| | | | | Change-Id: I070eeb27b1630331afd7f4f02aadf97f6ea2bf97 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Cocoa: Make retina desktop components work.Morten Johan Sørvig2013-03-261-4/+8
| | | | | | | Scale non-widget paint devices as well. Change-Id: Ic68fb166058e9b162f8baeab81196ee254f30b2e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fusion Style: draw toolbar lines for non-widget apps.Frederik Gladhorn2013-03-231-1/+1
| | | | | Change-Id: If9415cfc05f80ba4e67d9ba6a8ebb1caaa738b84 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWindowsVistaStyle: fix checkbox animations for QtQuick ControlsJ-P Nurmi2013-03-221-1/+2
| | | | | | Change-Id: I740dfab748fe9cc79a861c549030ff9e9e608df2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWindowsVistaStyle::drawPrimitive(PE_Frame): fix background clippingJ-P Nurmi2013-03-211-10/+7
| | | | | | | | | | | | | | The purpose of PE_Frame is to draw the frame, not the background. The old code tried to check whether a custom base brush was set, and otherwise let the theme draw the background. That didn't work together with CSS background images. This change removes the background drawing from PE_Frame, and let's PE_Widget to draw the background using the base brush that defaults to a color fetched from the theme. Task-number: QTBUG-24783 Change-Id: Iaddfcbd613122a9aed39e77ba05a26f94995f7d2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWindowsVistaStyle: fix QTextBrowser frameJ-P Nurmi2013-03-211-1/+2
| | | | | | | | | | Check for QAccessible::StaticText role in addition to EditableText, to get correct frame for non-editable text widgets, such as QTextBrowser. Task-number: QTBUG-24783 Change-Id: I2c3e4f4fa06c8122485b1bc6c1da04c7565c7223 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-2065-394/+2286
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-1957-57/+57
| | | | | | | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-1611-119/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Improved appearance of mac toolbar handlesJens Bache-Wiig2013-03-131-9/+3
| | | | | | | | | | | | | | The old ones were too heavy and cluttered to fit on mac. Change-Id: I5d9f1a8801992026af65af4c6b2aeae3a03a9f5c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Improve the look and feel of Mac extension arrowJens Bache-Wiig2013-03-136-75/+6
| | | | | | | | | | | | | | | | This adds an improved extension arrow as well as a graphic for retina macs. Change-Id: Ie7395bbd87d6d354437bdbcc0cf258a27c09a360 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Draw StatusBar with gradient on macJens Bache-Wiig2013-03-131-12/+0
| | | | | | | | | | | | | | | | We can safely remove code applying to 10.3 on mac. We also should draw the gradient even on non unified toolbars. Change-Id: Ia97c3c93daf7a711c3ce4b61b74a5eb1d914519b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Add convenience for section actions in QMenuKevin Ottens2013-03-134-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those actions are just separators having also text and potentially icon. It is very convenient to create titled sections in a menu, or give a title to a context menu. Obviously requires support for them on the style side, but modern styles like fusion or oxygen handle them just fine. For legacy styles it properly falls back to a regular separator aspect. That's why a specific style hint is also introduced. It is used by QMenu to know how the sections will be treated and take care of them correctly when eliminating duplicated separators or separators at the beginning of the menu. Change-Id: Iad00a93422b7983dc90dfc4b4b1c360122e47610 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * QAndroidStyle: Fix warnings and compilation on Windows.Friedemann Kleint2013-03-061-10/+10
| | | | | | | | | | Change-Id: I0ce4545bdc40a5e1a8297a225c2a656076df4580 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Fix export of QAndroidStyle.Friedemann Kleint2013-03-061-1/+1
| | | | | | | | | | Change-Id: I779323403f6721ca904c517b7ffd78aff29d0a96 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * qtbase: Fix duplicate symbol errors in static build on MacGabriel de Dietrich2013-03-061-24/+30
| | | | | | | | | | | | | | | | | | | | | | There is some code duplication between QMacStyle anf the Cocoa QPA plugin regarding painting and bridging with Cocoa. Task-number: QTBUG-29725 Change-Id: I347407a9bca47b6fccd77fb924688bd35135d96b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Compile.Morten Johan Sørvig2013-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | d28073d9 enables the Mac style on all "mac" platforms, including iOS where it does not compile. Disable the mac style on all platforms except "macx" (Mac OS X). Change-Id: I67685f745b1a0910b05794cddeaf27cdaa31cbfd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-061-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * \ Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-03-066-31/+35
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-056-31/+35
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * | | | Distinguish between 'mac' and 'macx' qmake scopesTor Arne Vestbø2013-03-051-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The former applies both on Mac OS X and iOS, but 'macx' is specific to Mac OS X. ios.conf and macx.conf now share most of their settings in the common mac.conf. We set the default QMAKE_MAC_SDK before loading mac.conf, so that any overrides in the device config will apply afterwards. This means configure's mkspec parsing will be able to read the QMAKE_MAC_SDK. Change-Id: I0c7e26a6a0103e19b23ef152aa9e4ab461cee632 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * | | Introducing the Qt Android portPaul Olav Tvete2013-03-055-0/+2006
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | Add QProxyStyle(QString key) constructor for convenienceJ-P Nurmi2013-03-042-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QStyle implementations are becoming private, so the following slightly verbose pattern seems to be now repeated a lot: new QProxyStyle(QStyleFactory::create("windows")) This change adds an alternative, more convenient constructor for this particular use case: new QProxyStyle("windows") Change-Id: I97ded597a0fd3225a6354ebea0abb367237430af Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * | | Fusion style: Remove unnecessary widget castGabriel de Dietrich2013-03-041-6/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I8d7fd79b396525ee00fb0ba95faf0c95b5d2899a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>