summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * FusionStyle: Don't try to draw null pixmapsUlf Hermann2015-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | We have the same check for null already for PE_IndicatorHeaderArrow which actually uses the same pixmap. If the file is not found the pixmap will be null and the code dividing by its width or height will thrown an arithmetic exception. Task-number: QTBUG-43067 Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QtWidgets: convert some users of QSize::transpose() to transposed()Marc Mutz2015-01-081-3/+1
| | | | | | | | | | | | | | | | ...because transposed() is inline (and transpose() is not), and because it makes the code more readable and compact. Change-Id: I5661ee6251be638fb40c5c748aa50a89de6f7735 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-271-0/+6
|\| | | | | | | Change-Id: Id20053d261b4fbbcc0ac8ba49dd3ef2253fa4b95
| * fix the build with animation omittedShawn Rutledge2014-11-271-0/+6
| | | | | | | | | | | | | | configure -no-feature-STATEMACHINE -no-feature-ANIMATION Change-Id: Idb89c0bae8d699e76916317f83490c6c94c7d8b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * QFusionStyle: properly indent an if statementGiuseppe D'Angelo2014-11-141-1/+3
| | | | | | | | | | | | | | | | Fix the style trap that leads people into thinking that's an else-if, while it's a plain if. Change-Id: I62963f0d6270eadcbd8aede7bac60f83968cb0d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-201-1/+2
|\| | | | | | | Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
| * DPI-scale PM_SubMenuOverlap after allOswald Buddenhagen2014-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | This actually isn't a magic value and needs to be scaled. This partially reverts commit be1635e2d6a4e42f3f828e7831e5dbf867ba161d. Task-number: QTBUG-41864 Change-Id: Ie03c96c8b5343386f55c3ae9b988e79f943f334e Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-5/+2
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Don't dpi-scale -1 pixel metricsOswald Buddenhagen2014-09-301-5/+2
| | | | | | | | | | | | | | | | It may be rounded down to 0, thus losing its magic value. Task-number: QTBUG-41324 Change-Id: I5a5b98bb24bd0478c10940a90a7dc691e2663f4d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-22/+14
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * 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>
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * QFusionStyle paints sliders outside of clipAllan Sandfeld Jensen2014-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When painting a slider the QFusionStyle overrides the existing clip on QPainter thereby causing itself to be painting unclipped. Changes replace clipping with intersection clipping. Task-number: QTBUG-40530 Change-Id: I0135928c36ca1d23c906cf82c584ded01720b1cc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * | Allow overriding standardIcon() in a proxy styleAlexander Volkov2014-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][Styles] Allow overriding standardIcon() in a proxy style Change-Id: I3c7983a7e51a8b220a0ca8ead2b4d7b87a77d71b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fusion Style: Workaround to get combo box item style from QtQuick CtrlsJan Arve Saether2014-09-171-1/+2
| | | | | | | | | | | | | | | | | | | | | This is to align the behaviour with how QGtkStyles behavior is. Change-Id: Ic85d96cf4a4ab30974b25936de6d5b98e65dd2f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Do not draw combo box items as checkedJan Arve Saether2014-09-021-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | QComboBox sets the checked styleoption state before asking the style to paint it's items. I suspect this checked state was only meant to be used as an indicator of the current item for some styles. For Fusion this case seems to have been forgotten. Now the code tries to align with how qgtkstyle does it. Change-Id: I26d8e86bc0d490d5b820df0239ee3f7bdd4208b1 Task-number: QTBUG-40976 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Fix high DPI icons in menu itemsAllan Sandfeld Jensen2014-08-011-2/+2
| | | | | | | | | | | | | | | | | | The position of high DPI icons is wrong in the Fusion style because the pixel resolution is not taking into account when centering them. Task-number: QTBUG-40277 Change-Id: I3593ed461ea57543c3ddfd473105fdc698789132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fusion style: Use QStyleHelper::dpiScaled() where applicable.Friedemann Kleint2014-07-211-57/+83
|/ | | | | | | | | | | | | | | | | When running unscaled on a high resolution display, some items are too small. This patch converts most values returned by QFusionStyle::pixelMetric() via QStyleHelper::dpiScaled(). Some adjustments have been done to RadioButton, CheckBox, Slider and SpinBox. On systems with 96dpi, FusionStyle should still look exactly as before this patch. Task-number: QTBUG-40277 Task-number: QTBUG-38858 Change-Id: I2683a8a4db615d01c08f4d6f559417b995c0eb1a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QMac/FusionStyle: fix the background color for transient scrollbarsJ-P Nurmi2014-06-301-1/+1
| | | | | | Task-number: QTBUG-39922 Change-Id: I4b313296ae845bc9e116494aa66c577b432b4a67 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QFusionStyle: support transient scrollbarsJ-P Nurmi2014-03-201-31/+165
| | | | | | | | | | | | | | | | | | | | QFusionStyle doesn't make scrollbars transient by default, but the feature can be enabled with a proxy style: class MyProxyStyle : public QProxyStyle { public: int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0, QStyleHintReturn *ret = 0) const { if (sh == QStyle::SH_ScrollBar_Transient) return 1; return QProxyStyle::styleHint(sh, opt, w, ret); } }; Change-Id: Ibf169e219ad920cbe7edb06e128e09ed4d8faf96 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix rotation of text in vertical QDockWidget titlebars in QFusionStyle.Parker Coates2013-07-021-0/+4
| | | | | | | | | | Presumably this was just an omission when QFusionStyle was first written. These three lines were taken directly from the equivalent portion of QWindowsStyle and seem to work as expected. Task-number: QTBUG-31904 Change-Id: I2f288d3cf2bfa3fe4f7f4a71e2726a172ec8e1b3 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fusion & GTK styles need to check direction from style option not qappShawn Rutledge2013-04-181-1/+1
| | | | | | | | | | 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>
* 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>
* 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>
* 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>
* Add convenience for section actions in QMenuKevin Ottens2013-03-131-0/+1
| | | | | | | | | | | | | | | | | | 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>
* 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>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix some typosSergio Ahumada2012-12-211-1/+1
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-011-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix compile with -DQT_NO_WIZARDMontel Laurent2012-12-011-2/+2
| | | | | Change-Id: I6f7be895b8c4a1a65de43ee35d1fab25a30a25c6 Reviewed-by: David Faure <david.faure@kdab.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>
* Made QFusionStyle internalJ-P Nurmi2012-11-211-1/+2
| | | | | | | | | | | | | 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>
* Improve highligted colorization on mac with Fusion styleJens Bache-Wiig2012-11-151-1/+1
| | | | | | | | 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>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-3/+3
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix clipping and font problems with groupbox in Fusion styleJens Bache-Wiig2012-10-221-10/+14
| | | | | | | | | | | The groupbox did not take custom fonts into account when calculating the height of its titlebar. This resulted in clipping issues on Windows. Task-number: QTBUG-27655 Change-Id: I7252bc94d2bbb0731b9dbc1caa6cdd2074fdd7ab Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Introduce new style FusionJens Bache-Wiig2012-10-181-0/+3578
This is a new non-native style for Qt. It is intended as a replacement for the now aging Plastique and Cleanlooks styles. Change-Id: I30c0518a69e4e3b8b2b05ee7d84c3a5a1f307578 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>