summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtabbar_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't use QCursor::pos in QTabBar and fix hover handlingVolker Hilsheimer2021-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | Relying on QCursor::pos makes tests fragile and prevents multi-seat support. Instead, record the mouse position in the already existing event handling, and use that instead. Styles might use either WA_Hover or enable mouse tracking for the widget to enable hover-effects, so we need to support both. Fix the scenario where a newly inserted tab ends up under the mouse, which was previously not handled correctly (only the case of removing a tab was). Clean up the repaint management when the hovered tab changes; just call update on the old rect, and then later update on the new rect; there's no need to make a copy first, updates are posted and compressed. Add a unit test that makes sure that we paint tabs that should be under the mouse in the hovered state. Since not all styles enable hovering and/or mouse tracking in all cases, use a style sheet for those styles that don't. Change-Id: I7cdbb18e9e04b52651e273680fec87b50cb81e05 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix build without features.animationTasuku Suzuki2020-08-281-1/+1
| | | | | | | This has been broken since 359616066e64eed947c6c91cb8902285ed79dd0d. Change-Id: I9428bf4e1bca3f10c59a7ea334e6bb7e43c4e020 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refactor QTabBarPrivate::Tab and much of its usage in QTabBarVolker Hilsheimer2020-07-071-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | The type was broken in that it pretends to be a value, but didn't implement the necessary operators for save copy, move, or comparison. Tabs are supposed to be managed by Tab instance, as the crazy implementation of operator== demonstrated. Refactor the code to use it as a pointer consistently, even though this means additional allocations for each tab. This is however acceptable since there are not millions of tabs, and there is only a single place where tabs are removed from the list. Also use ranged for where possible, and never access the tabList using operator[] to avoid detaches. Use a std::unique_ptr for the animation in the tab, which implicitly protects against attempts to copy a Tab, and allows us to use the compiler generated default destructor. Add Q_DISABLE_COPY_MOVE for good measure, the compiler-generated move semantics would not work either due to the back-pointer from animation to the tab. Change-Id: I8e8c071472f8f1f401b0f4f1dde074d800842934 Fixes: QTBUG-85394 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve data member ordering and initialization in some private classesVolker Hilsheimer2020-07-041-59/+50
| | | | | | | | | Put bit fields together, and generally order by size to maximize the compiler's ability to pack data. Initialize in declaration where possible. Change-Id: I49d4a3d2271229d671aeaf3eb17e6b7ecdc5099e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Keep track of mouse button state in QTabBarVolker Hilsheimer2020-07-021-5/+8
| | | | | | | | Get rid of call to QGuiApplication::mouseButtons Task-number: QTBUG-73829 Change-Id: I7cc706b5e037c68ecf3c778b824ae8c93e5cfe38 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove deprecated QStyleOption::init()Christian Ehrlicher2020-06-211-1/+1
| | | | | | | | Even it was not marked as deprecated the replacement function initFrom() is available since Qt4 times (and init() is deprecated since then) Change-Id: I09a4ebbf66b01fbe7aec67691dc68d2e42d1cd78 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port QT_NO_TOOLTIP to QT_CONFIG(tooltip)Joerg Bornemann2020-04-211-1/+1
| | | | | | | | | | | | We remove the QT_NO_TOOLTIP check from qstandarditemmodel.h, because as the 'tooltip' feature is in QtWidgets, we cannot use it properly in QtGui. Also this affects just two non-virtual inline methods, i.e. it has no effect on library size. Task-number: QTBUG-82785 Change-Id: Ic166f14fb1cf3e9dd789573a6b9db6a87fb50e10 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Allow hiding tabs in QTabWidget / QTabBarJordi Pujol Foyo2019-12-201-2/+7
| | | | | | | | | | | Add 2 methods to set/ask if a tab is hidden. [ChangeLog][QtWidgets][QTabWidget/QTabBar] Tabs can now be hidden with setTabVisible Fixes: QTBUG-63038 Change-Id: I7b07ecdb485e1f6c085d03515ef2b73baae889de Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-2/+2
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-201-6/+0
| | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* More nullptr usage in headersKevin Funk2019-03-141-2/+2
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-4/+6
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Modernize the "animation" featureLiang Qi2018-10-121-4/+6
| | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make local symbols of some leaked namesThiago Macieira2018-08-031-15/+0
| | | | | | | | | | | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QTabBar: properly clean up move animationChristian Ehrlicher2018-04-041-1/+1
|/ | | | | | | | | | | In TabBarAnimation::updateState() the wrong parameter was used to determine if the animation has stopped or not. This lead to a call to moveTabFinished() when the animation started and not when it was finished. Task-number: QTBUG-42951 Change-Id: I213c7f5e863a9a4e33bd472de93933efebf63fc7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-8/+8
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-5/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Convert features.tabbar to QT_[REQUIRE_]CONFIGStephan Binner2017-07-251-5/+2
| | | | | | | | | | Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-1/+1
| | | | | | | | | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QStyle: deprecate SH_Widget_Animate in favor of SH_Widget_Animation_DurationElvis Angelaccio2017-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new SH_Widget_Animation_Duration style hint that applications can query instead of manually hardcoding the duration of an animation. As default value we use 200, which is the value that was already used in QWidgetAnimator. A value equal to 0 means that the animations will be disabled. This also implies that the SH_Widget_Animate style hint is superseded and can be deprecated. The new style hint is configurable with style sheets. [ChangeLog][QtWidgets][Styles] Added SH_Widget_Animation_Duration style hint which deprecates SH_Widget_Animate. Change-Id: Ic3f5e4f7145a89697f28666aeaecabb1f3c5c96f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Pluginize the platform stylesJake Petroules2017-04-141-1/+1
|/ | | | | | | | | | | | | | This enforces decoupling and in the case of QMacStyle, isolates QtWidgets and therefore end user applications, from Carbon/HITheme. Windows and Fusion are platform independent, so they remain built-in (but mostly because the Windows style is tightly coupled to other styles like QStylesheetStyle). Task-number: QTBUG-59428 Change-Id: Id6519fe0c5269c1bce5b5921f9db06257032a1c9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QMacStyle: update QTabBar styleOleg Yadrov2017-03-081-1/+3
| | | | | | Task-number: QTBUG-58266 Change-Id: I135e4dae44e2e97d73b7c7c97d8e682bcf459d75 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-141-2/+2
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-0/+3
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * QTabBar: Cache title text sizesGabriel de Dietrich2016-08-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first part adds QTabBarPrivate::initBasicStyleOption() which is basically QTabBar::initStyleOption() but without the expensive QFontMetrics::elidedText() call. That is because QTabBar::tabSizeHint() would call initStyleOption() and then immediately discard the result of that computation. Then, QTabBar::tabSizeHint() is modified to cache the calls to QFontMetrics::size(), which is also expensive. The cache is invalidated when the style or the font changes, or when the elide mode is set. Change-Id: I591b2e401af3576a2ebabc5b94f19ae157e28cf2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Add qtwidgetsglobal.h and qtwidgetsglobal_p.hLars Knoll2016-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Widgets. For now it defines the Q_WIDGETS_EXPORT macro for this library. Change-Id: I6698989b952b9bac94d086d9f219e03c000f7d53 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTabBar: Add setAccessibleTabName() and accessibleTabName()Dongmei Wang2016-04-241-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | Currently, a tab's text is used as its accessibleName. When a tab's text is empty, there is no API to set the tab's accessibleName. The two APIs are added to set and return the accessibleName property of a tab. Task-number: QTBUG-46530 Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-1/+14
|\| | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| * QTabBar: enable high dpi moving of a tabGiuseppe D'Angelo2016-03-251-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving tabs of a QTabBar goes through a temporary QWidget that captures a "screenshot" of the tab, and then gets moved around. Unfortunately, that screenshot was not using the devicePixelRatio, resulting in blurry text and icons. For some reason, setting the DPR on the pixmap isn't enough -- that causes it to be drawn twice as big (bug somewhere in Qt styles?). Work around that by not using the palette, but a simple widget which draws the pixmap (which also leads to somehow clean code). Change-Id: Id12f9251625693d108031488ddfab86277128705 Task-number: QTBUG-50898 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: mark some constructors explicitMarc Mutz2015-12-071-1/+1
| | | | | | | | | | | | | | Non-public API. Change-Id: I68628c51df815f26e8de7522629a611f805673bb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Widgets: enable scroll buttons to be placed anywhere on a QTabBarRichard Moe Gustavsen2015-11-161-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a tab bar contain more tabs than it can fit inside its geometry, it will show two scroll buttons that lets the user scroll left or right. From before, those buttons where hard coded to always be placed together on the right side of the tab bar. This patch will make it possible for the style to specify the exact geometry of both scroll buttons. The reason for this is that 3rd party styles has a specific need to place the "scroll left" button on the left side, and the "scroll right" on the right side. Additionally, there is a need to draw fade-out effects on tabs that end up half-way obscured by the buttons. This can already be achieved by extending the tab tear concept to include two tears/fade effects, one for each side of the tab bar. Previous code in QTabBar that hard-coded scroll buttons and related functionality will now be factored out to the style, and the base style (QCommonStyle) will implement the old default logic of placing the buttons together on the right side. Six new style enums will be added: SE_TabBarScrollLeftButton: the rect of the left scroll button SE_TabBarScrollRightButton: the rect of the right scroll button SE_TabBarTearIndicatorLeft: the rect of the left tab tear SE_TabBarTearIndicatorRight: the rect of the right tab tear PE_IndicatorTabTearLeft: draw the left tab tear PE_IndicatorTabTearRight: draw the right tab tear Change-Id: I4cda05c2f7323de5cbd3ca071eb796085257c19b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* QtWidgets: remove use of obsolete QStyleOption*V<N>Marc Mutz2015-11-041-1/+1
| | | | | | | | They are obsolete since Qt 5.0. Change-Id: I3a1ee314126bd245a3c788ac7af49905ab50945f Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-1/+1
| | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-2/+2
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-6/+6
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* Add the QTabBar::changeCurrentOnDrag property.Ivan Komissarov2014-08-061-1/+8
| | | | | | | | | | This property indicates that the current tab will change whilst dragging over the tabbar [ChangeLog][QtWidgets][QTabBar] Added changeCurrentOnDrag property. Change-Id: Ib7d5a7613c9cd8432b84c523f66c02cd6c3c3c81 Reviewed-by: David Faure <david.faure@kdab.com>
* Added autoHide property to QTabBarIvan Komissarov2014-07-101-1/+3
| | | | | | | | | This property is used to automatically hide tab bar if it has only one tab. Originally-by: Denis Kovalskiy <denimnumber1@gmail.com> Change-Id: I6967f760010fa55bad6a5986c29abe7ccf625cf8 Reviewed-by: David Faure <david.faure@kdab.com>
* Mac: Implement unified toolbar look for QTabBarMorten Johan Sørvig2014-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Extend the unified title and toolbar gradient to tabs in document mode that are adjacent unified tool bars. Change the updateMacBorderMetrics() function to register the tab bar geometry and visibility status with the Cocoa platform plugin. The Cocoa platform plugin will then merge this area with other registered areas if possible. Add QCocoaNativeInterface::testContentBorderPosition(). This function tests whether the given point is within the unified title and toolbar area. Use testContentBorderPosition() in QMacStyle to enable code paths that skips drawing the QToolBar bottom separator line and paints the active tab background with transparent pixels to make the background gradient visible. Change-Id: I2b70f9bb0c2c59af053a691a7df538f958783dab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* De-inline virtuals of some non-exported private classes in QtGuiThiago Macieira2013-09-231-4/+2
| | | | | | | | | | This is to work around a bug in GCC 4.7's link-time optimiser. Without it, linking QtOpenGL and QtPrintSupport fails because the compiler generates the code for the virtuals, including the virtual table, but not the methods. Change-Id: Idcecd51c32e6228e0eefe67f1bd630ea1f5d5da7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Added SH_Widget_Animate in QStyleÀlex Fiestas2013-08-021-0/+5
| | | | | | | | | | | Added SH_Widget_Animate in QStyle styleHint, and use it to determine whether widgets should be animated or not. In this patch QTabBar, QColumnView,QTreeView and QWidgetAnimator are patched to obey the new Hint. Change-Id: Iefdbddc52c7843f6653dbfb5462125942489b4d9 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* 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>
* QTabBar - add minimumTabSizeHint as virtual function.Thorbjørn Lund Martsum2012-03-101-2/+0
| | | | | | | | Just implements what the note states (and removes the private function) Change-Id: Ida009e1836ded5816218372edb8c178523242a9e Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>