summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-198-133/+133
| | | | | | | | | | | | | | | | 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 devLiang Qi2017-08-311-7/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * QWidgets/CommonStyle: Fix tooltip drawing under HighDPIAlessandro Portale2017-08-291-7/+2
| | | | | | | | | | | | | | | | | | | | | | Delegating the border painting to qDrawPlainRect ensures that there are no off-by-one pixel issues. Task-number: QTBUG-61849 Change-Id: I56dc849da80fad00d02a0f9c60dbb621e6de7c48 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| * macOS: Fix padding around tab label with iconEskil Abrahamsen Blomfeldt2017-08-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change c12072c685f7e93d5b84e289ca23106482379eff fixed a problem where tab labels would overlap with the icons if the tab became too small to contain the text. But it did not properly account for the full area occupied by the icon, because the horizontal padding is hardcoded to 4 in the mac style, whereas in the common style (where the icon is drawn) it uses the pixel metric for this. In addition, the change only allocated space on the left side, causing the label to no longer be centered. Task-number: QTBUG-61235 Change-Id: Ieec4f7044584361f92045addbc8bbd81bd5c9fc7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-157-66/+86
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Convert features.graphicsview to QT_[REQUIRE_]CONFIGStephan Binner2017-08-151-1/+3
| | | | | | | | | | Change-Id: I1083097802772624e5d414678b4612308683a56f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.toolbutton to QT_[REQUIRE_]CONFIGStephan Binner2017-08-106-17/+29
| | | | | | | | | | Change-Id: I4227e1868da21bded76a8ec55996c436c8a8d763 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.splitter to QT_[REQUIRE_]CONFIGStephan Binner2017-08-103-2/+6
| | | | | | | | | | Change-Id: I2eea5004938c581beb5a7c0c01409c576c5e5b39 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.groupbox to QT_[REQUIRE_]CONFIGStephan Binner2017-08-104-13/+19
| | | | | | | | | | Change-Id: I034286043a880ab777ec3f2311572bdc38e7fafc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.scrollbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-109-18/+31
| | | | | | | | | | Change-Id: Id6ea899c0fddf0de636701cfdc5f01ba20024976 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.toolbox to QT_[REQUIRE_]CONFIGStephan Binner2017-08-102-6/+6
| | | | | | | | | | Change-Id: I7abfe0166a021c439f6ed4465631ba62660ef001 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.progressbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-106-8/+18
| | | | | | | | | | Change-Id: I66d00d5bac98ff337ba5877e5f23be5e14a97551 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.statusbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-081-1/+0
| | | | | | | | | | Change-Id: Ifc1881388e559d3235df0202ac6d26f78ba2c691 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.dial to QT_[REQUIRE_]CONFIGStephan Binner2017-08-085-11/+11
| | | | | | | | | | Change-Id: I9fea2451fe3567fdd1af1540e9a55f218f54b569 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Android: Fix push button label duplication with stylesheetsEskil Abrahamsen Blomfeldt2017-08-041-33/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Android style, we matched both the full CE_PushButton, and the individual, decomposed CE_PushButtonBevel and CE_PushButtonLabel (and similar for other controls) to the same drawing code which draws both the label and the bevel. When used together with the style sheet style, this caused the label of the button to be drawn multiple times in different locations. For labels, we now skip the part which draws the actual control, and for the non-textual parts of the controls, we skip drawing the label. [ChangeLog][QtWidgets][Android] Fixed label duplication for buttons when using style sheets with the Android style. Task-number: QTBUG-48639 Change-Id: I1a1cdb0a82870cebd0438c5c72199afc3192938c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-028-122/+155
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add a Q_FALLTHROUGHJesus Fernandez2017-08-021-0/+1
| | | | | | | | | | | | | | | | | | CID 11161 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: The case for value Qt::BottomToolBarArea is not terminated by a 'break' statement. Coverity-Id: 11161 Change-Id: Ie254d0339e41a58004632e9997febac4a1ab4edd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Convert features.tabbar to QT_[REQUIRE_]CONFIGStephan Binner2017-07-259-52/+64
| | | | | | | | | | Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.dockwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-257-22/+32
| | | | | | | | | | Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.tabwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-255-19/+23
| | | | | | | | | | Change-Id: Iab985564fd2069188df01f8ff3e00add86eb86f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-257-30/+36
| | | | | | | | | | | | | | The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.combobox to QT_[REQUIRE_]CONFIGStephan Binner2017-07-2510-43/+57
| | | | | | | | | | Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.listview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-215-1/+11
| | | | | | | | | | Change-Id: I707a839bcfc7ad481342d1adb98c9b593f5ca6e2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix 32-bit build on macOSJake Petroules2017-07-201-4/+4
| | | | | | | | | | | | | | | | | | | | Some customers still need this for interoperability with legacy code. Let's continue to keep it working in 5.9.x, and then move to 64-bit exclusive features (thus dropping 32-bit entirely) in 5.10. Task-number: QTBUG-58401 Change-Id: Ibb7200c1885e9caba70439df5f7c86c81b1312b5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-193-3/+4
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Allow fusion style to follow platform theme on button iconsAllan Sandfeld Jensen2017-07-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Do not try to set the default value of dialog buttons in fusion, but let the common style handle it that asks the platform theme. This adds icons to dialog buttons on platforms that usually has that (such as KDE). Change-Id: I29cfa49cfd993224220bc992c523f5b2df20870d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * Convert features.treeview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-155-4/+12
| | | | | | | | | | Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-136-16/+105
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * QMacStyle: Remove unused variable warningGabriel de Dietrich2017-07-121-1/+1
| | | | | | | | | | Change-Id: Id6116ad110ac39898e9c44ae41c6d7eec96f58d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Convert features.tableview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-113-1/+7
| | | | | | | | | | Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.datetimeedit to QT_[REQUIRE_]CONFIGStephan Binner2017-07-112-1/+5
| | | | | | | | | | Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.rubberband to QT_[REQUIRE_]CONFIGStephan Binner2017-07-117-18/+28
| | | | | | | | | | Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QMacStyle: Add back icon logic in tab layoutGabriel de Dietrich2017-07-102-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was accidentally removed when we revamped the document mode tabs appearance. In retrospect, we should also consider adding CE_TabBarTabIcon so that we can set the relative position of the icon w.r.t. the tab title. Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8 Task-number: QTBUG-61092 Task-number: QTBUG-61742 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix modernize-use-bool-literals issuesKevin Funk2017-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Reported by clang-tidy. Skipped fixes in implementation files, only changed headers. Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QWidgets/FusionStyle: Fix menu drawing under HighDPIAlessandro Portale2017-07-071-4/+2
| | | | | | | | | | | | | | | | | | Delegating the border painting to qDrawPlainRect ensures that there are no off-by-one pixel issues. Task-number: QTBUG-61845 Change-Id: I732795e048cbc2e5b279782e9a19700884f8bc40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QWidgets/drawutils: Handle device pixel ratio != 1Friedemann Kleint2017-07-071-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The panel drawing helpers have code drawing shadows that relies on working with integer coordinates and one pixel lines, which causes artifacts when Qt High DPI scaling is in effect. Add code that checks for device pixel ratio != 1 and in that case reverts out the Qt High DPI scaling transformation and scales the parameters so that the drawing code used device pixels. Task-number: QTBUG-58611 Task-number: QTBUG-59116 Change-Id: I8402044f3fd4dfcd349b31c573dcad12ae1f609f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| * QMacStyle: Bring back always visible close button in non-document QTabBarGabriel de Dietrich2017-07-061-6/+14
| | | | | | | | | | | | | | | | | | This case is not supported by the Mac HIG, so we need to improvise some colors that look better than those used in document mode. Change-Id: I9858be468680303fdf65e17aa10ca1f90718b236 Task-number: QTBUG-61092 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QMacStyle: Properly polish and unpolish QTabBarGabriel de Dietrich2017-07-061-0/+11
| | | | | | | | | | | | Task-number: QTBUG-61092 Change-Id: Id8b6caef264c61936a425757c6d8fac63142d5ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-043-3/+9
|\| | | | | | | | | | | | | | | | | | | | | | | 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.wizard to QT_[REQUIRE_]CONFIGStephan Binner2017-07-025-5/+12
| | | | | | | | | | Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.inputdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-6/+6
| | | | | | | | | | Change-Id: Ie480efcfc1fdc00e2b2697cf4c5abb231b42cc0e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Windows code: Add Q_FALLTHROUGH or break to unmarked fallthroughs seen by GCC 7Friedemann Kleint2017-06-282-5/+5
| | | | | | | | | | | | | | Rearrange code handling QtWindows::DisplayChangedEvent. Change-Id: If9f32516108fb64c4a252c84392f2fd7f1872bf1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Fix current tab text color on Mac when a proxy style is installedGabriel de Dietrich2017-06-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | We move the code forcing white text on the current tab to QMacStyle. This removes the small encapsulation violation even though we need to check for the tab text color in the style and modify the palette. Amends 2fbc1432025dd478cf9e940e3c2a1952b218c6dc. Change-Id: If31dc11ae389ee5315e84ab03cf1c08540d81640 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QStyleHelper: add missing forward declarationsSamuli Piippo2017-06-211-0/+4
| | | | | | | | | | | | | | | | Fixes build with -no-accessibility. Change-Id: Ia58c11b22f08a51d5978e4a002480d265aa10fbd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Convert features.columnview to QT_[REQUIRE_]CONFIGStephan Binner2017-06-121-2/+2
| | | | | | | | | | | | | | Side effect: fix of QT_NO_COLUMNVIEW <-> QT_NO_QCOLUMNVIEW inconsistency. Change-Id: I42702ea7b362a4b6fb5dad78ee105e6cbbf8bcf6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QStyle: deprecate SH_Widget_Animate in favor of SH_Widget_Animation_DurationElvis Angelaccio2017-06-044-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QStyleAnimation: Go down to 15 fpsGabriel de Dietrich2017-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new implementation of CE_ProgressBarContents in QMacStyle uses NSProgressIndicator, which is noticeably heavier than the previously used HITheme API. Setting the animation frame rate to 20 fps improves things significantly compared to the default 30 fps, but Cocoa seems to update the animation at 15 fps for indeterminate NSProgressIndicator. Going down to 12 or 10 fps may be an option in the future, but it's not compatible with NSProgressIndicator. Change-Id: Ie1e18d7d78d1bd7ea38a12d715a6a7db0e175a29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QMacStyle: Replace QAquaWidgetSize with WidgetSizePolicyGabriel de Dietrich2017-05-151-1/+1
| | | | | | | | | | | | | | | | | | No need to have two enums for the exact same purpose. qmacstyle auto-test updated as well. Change-Id: Ia601648191e39c0cbbaa7477143441005ae063c2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-4/+8
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad