summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* OS X: Fix QRubberBand drawing on retina displaysMorten Johan Sørvig2014-04-031-1/+3
| | | | | | | | | | | Extend the existing rect adjustment to cover the upper/left edges as well. Check for a valid rect before drawing. Task-number: QTBUG-34534 Change-Id: I156abf4fb52924c350ec24fb44eadca86b2d5339 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Steve Mokris <smokris@softpixel.com>
* Mac theming: Remove obsolete private color conversion functionsGabriel de Dietrich2014-03-211-12/+0
| | | | | Change-Id: I165eea19c8e50f981a9fa48c14f0d63c40951747 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac theming: Set background brush for menu paletteGabriel de Dietrich2014-03-211-5/+0
| | | | | | | | We also remove overriding the background when polishing the palette in QMacStyle. This is a leftover from pre-10.5 styling. Change-Id: Icaa6d9c864ab01783d83cc02192981136c417d24 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Respect scrollbar position setting on MacJens Bache-Wiig2014-03-201-4/+4
| | | | | | | | | | | This was a regression from Qt 4.7. [ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for click-position on Mac. Task-number: QTBUG-36314 Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QFusionStyle: support transient scrollbarsJ-P Nurmi2014-03-202-32/+168
| | | | | | | | | | | | | | | | | | | | 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>
* QPushButton: draw label using the stylesheet's font.Mitch Curtis2014-03-201-0/+8
| | | | | | | | | | | The RenderRule for the stylesheet has the correct font information, it just wasn't being set on the painter that draws the label. Task-number: QTBUG-8990 Change-Id: I7cbaffc570421db04ebf3254cb6a21a68f7b868b Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fixes: style runtime warnings when painting too small widgetsaavit2014-03-201-2/+2
| | | | | | | | | Trying to create a 0-size cache image would lead to trying to paint to a null image, giving runtime warnings. Task-number: QTBUG-37035 Change-Id: I0a7fdb19cc7548dea2770d6be4eb283f6b898ada Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QMenu: Enable sloppy submenu mouse navigationGabriel de Dietrich2014-03-193-5/+8
| | | | | | | | | | | | | Since we're in the 21st century, we set QCommonStyle to return true to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic already available in QMenu. Task-number: QTBUG-20094 [ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation Change-Id: I134c87e348d98d1f46055e0bfef2b4a4a3d2993a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.Friedemann Kleint2014-03-143-15/+16
| | | | | | | | | | | | | The old code tried to check the 2nd parent for inheritance from QAbstractItemView. This also triggers for line edits on a QDialog parented on the item view. Introduce convenience function that checks for top levels in the chain. Task-number: QTBUG-37504 Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Vista Style: More menu item pixel fixes for QtQuick ControlsGabriel de Dietrich2014-03-141-2/+2
| | | | | | | | | | Includes a one-pixel fix for widgets, where the menu item text would be one pixel too far away from the vertical gutter. Task-number: QTBUG-37451 Change-Id: I2539233814a427c5bed66a5c07584717eb3df418 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QGtkStyle: remove file dialog functionalityJ-P Nurmi2014-03-143-334/+2
| | | | | | | | | GTK+ 2.x file dialogs are now implemented in QGtk2PlatformTheme Change-Id: I2babd6a35e7abd606ec5d047abbefbe3f0fbb892 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Update QStyle::sizeFromContents() docsJ-P Nurmi2014-03-051-8/+22
| | | | | | Task-number: QTBUG-37125 Change-Id: Id220312dab6b7e3e7de4932fd377f8850fe86e84 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Vista Style: Fix menu item checkmark offset for QQuick ControlsGabriel de Dietrich2014-03-041-1/+1
| | | | | Change-Id: I8d4a8f0d3a079a5569f9442f8d6d523f05daca60 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix QDateEdit popup appearance on macJens Bache-Wiig2014-03-041-6/+0
| | | | | | | | | | | | The WS/OS was obviously incorrect and the hack seems not to be needed any more. [ChangeLog][QtWidgets][Mac] Fixed incorrect appearance of QDateEdit with calendarPopup enabled. Task-number: QTBUG-36692 Change-Id: Ic62c9993dc13e783c00fcb56f75d92967eb5074d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Windows Vista Style: Don't draw menubar item background for QQ ControlsGabriel de Dietrich2014-03-041-5/+7
| | | | | | | | | In QtQuick Controls, we draw the full menubar background and the menubar items on top. Unless in a particular state, there's no need to draw the background or it may overlap with the menubar edge. Change-Id: Ia35a73274cc10b3b5a3f55573c92919f99555db0 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix some typosSergio Ahumada2014-03-033-3/+3
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-172-4/+11
|\ | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
| * Draw more inactive style elements in retina res.Morten Johan Sørvig2014-02-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | Update drawColorLessButton() and qt_mac_cg_context() to handle paint devices with a devicePixelRatio greater than one. Task-number: QTBUG-36792 Change-Id: I9d642846b299fc7048bb8e08765b9e1d7ee631fc Reviewed-by: Denis Dzyubenko <denis@ddenis.info> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * fix crash when using GTK 2.14 function in old gtkAndrey Volkov2014-02-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is additional fix for bug 23569. Previous fix (SHA1 7fcf1cf674d09d9dd1d41e2913252017f1d599ca) is not enough. QGtkStyle was still crashing with old gtk (< 2.14) in drawComplexControl () function. Bug was reproducible on CentOS 5.x and Red Hat 5.x. Current patch makes the same check as in commit mentioned but in another line of code. Task-number: QTBUG-23569 Change-Id: I261b61bc93ccaada879ed02ad4d0bef62935335b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Harri Porten <porten@froglogic.com>
* | Promote the scrollbar style animation to qstyleanimation_p.hJ-P Nurmi2014-02-114-57/+72
| | | | | | | | | | | | | | Makes it possible for QFusionStyle to utilize the same animation. Change-Id: Ifac9eaa3138cf1068439d5b0271a2acce54a3c16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-074-3/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * Ensure the text is not cut off when shown under a toolbutton iconAndy Shaw2014-02-031-1/+1
| | | | | | | | | | Change-Id: I82cfa549b9db9439ab03123ddf73e5f2d001738e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-01-271-0/+8
| |\ | | | | | | | | | Change-Id: I4680723bef393a15d5aa63b9dd7d5fbb599bd9fa
| | * Mac Style: Fix non-native menubar item spacingGabriel de Dietrich2014-01-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunate consequence from inheriting from Common style instead of Windows style. Also, a font entry missing in QCocoaTheme. Task-number: QTBUG-36224 Change-Id: I560494b1727734671478f70ee1ba800d21c916ca Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * | Don't skip content drawing for QtQuickControls SpinBoxMartin Klapetek2014-01-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If XPThemeData::noContent is set to true, the SpinBox from QtQuickControls renders with transparent background, which is being workarounded by simply adding white rectangle inside the QQC SpinBox, which in turn breaks other themes. This works in normal widget's QStyle because the spinbox there is drawn with a frameless QLineEdit, which fills the background. Setting XPThemeData::noContent to false for QtQuick items only makes the QQC SpinBox render correctly with Windows Vista style. Change-Id: I3229a2582dd1cad95c77e0961aaef502a8c6159a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * | Fix a possible crash in StyleSheetStyleJens Bache-Wiig2014-01-201-1/+3
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-35901 Change-Id: I72e82a166d30cf5e4dac2917c633c7cbd355c817 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | | QWindowsVistaStyle: Fixed position of menu gutter when using a custom widget ↵Friedemann Kleint2014-01-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | action. The gutter position was hardcoded to 28 which fits when drawing on the QMenu with a left margin of 3. It became offset when drawing on a custom widget with no margin. Calculate position relative to margin for left to right. [ChangeLog][QtWidgets][QMenu][Windows] Fixed position of menu gutter when using a custom widget action. Task-number: QTBUG-36218 Change-Id: Ibb34a9fba2bab7257482b80d2e51e76a9755345c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-01-212-37/+47
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-202-37/+47
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| | * | Correct wordwrapped text handling in QListView icon modeSamuel Gaist2014-01-141-1/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a QListView with wordwrapping activated will wrap the text only to the width of the icon even if the grid size is bigger. With this patch the option rect is now updated to match the grid size if valid and the style uses it to determine the correct size when wrapping [ChangeLog][QtWidgets][QTBUG-4714] Use the grid size for wordwrapping when available in icon mode Task-number: QTBUG-4714 Change-Id: I2cb63809d3ee8bd262f38bc11de91df9ff5cf237 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Mac: remove unified toolbar workarounds.Morten Johan Sørvig2014-01-121-25/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMainWindow::unifiedTitleAndToolBarOnMac() will again return true, but the new implementation is much more similar to the cross platform one so these workarounds are not needed. Task-number: QTBUG-34411 Change-Id: Ic95f491af94354776385dc984f1a00c64429a3f0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Mac: Update unified toolbar drawing code.Morten Johan Sørvig2014-01-121-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fill the toolbar background with transparent pixels to allow the view background to shine through. Draw a separator line using HITheme. Task-number: QTBUG-34411 Change-Id: I57732564a67a5a9d1eb7fd9038382b2b65be50a4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Mac: Update PE_IndicatorToolBarHandle drawing.Morten Johan Sørvig2014-01-111-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Smaller, rounder, darker toolbar handles. Works especially well in unified toolbar mode. Task-number: QTBUG-34411 Change-Id: I41eafdf0bb1dbbb4ed96d7bd799eb6f53bccbf7d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | QWindowVistaStyle: Always initialize text color of menu items.Friedemann Kleint2014-01-211-6/+4
|/ / | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QMenu][Windows] Correctly use text color set by style sheet for menu items. Task-number: QTBUG-36142 Change-Id: I142f2fd82164771b45bf599a6afa1121fcfd2187 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-133-2788/+2788
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-031-1/+1
|\| | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * Fix some typos in documentation.Jeff Tranter2014-01-021-1/+1
| | | | | | | | | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2e946fda0bd9a2117f8e9b2fb300df9bf0a98a6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-163-12/+7
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * Styles: Fix upRule used instead of downRuleCaroline Chao2013-12-101-1/+1
| | | | | | | | | | Change-Id: Icd157fa522836fab9128322f98b2916cfff35c61 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-052-11/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_post.prf tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp Change-Id: Iaba97eed2272bccf54289640b8197d40e22f7bf5
| | * QStyle: Fix painting of pixmaps with non-integer devicePixelRatioEike Ziller2013-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example QIcon can return pixmaps with non-integer devicePixelRatio, if there is no pixmap that exactly matches the requested size. Task-number: QTBUG-35125 Change-Id: I76bfa2766979a454c24b1abcf9e18930f5671c1e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix style animations to stop when the animation target is hiddenJ-P Nurmi2013-12-041-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleAnimation automatically stopped for hidden QWidgets, but didn't know anything about QQuickItems and kept animating regardless of their visibility. This change ensures that style animations stop as soon as the animation target no longer accepts the animation update eg. it has become hidden or the window was minimized. Task-number: QTBUG-35319 Change-Id: Ie48191fd918c626c0d9afe2e7d2390c495efb071 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-264-13/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * | Mac style: Fix pressed tab appearanceGabriel de Dietrich2013-11-251-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib2bfc5afcb4d1a9fa20f5b1ec90c4c239a97954e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * | Mac style: Fix selected tab text color on 10.6Gabriel de Dietrich2013-11-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by 65b39b3cdcdfe175d80ccf9428168ed51be77fd8. Task-number: QTBUG-34540 Change-Id: I1f78337b13c806f6b6794b769cfe99206445ce7a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * | Remove QMacStyle titlebar height + 4 adjustment and consequencesShawn Rutledge2013-11-211-1/+0
| |/ | | | | | | | | | | | | | | | | | | This was a tweak to fix a bug in 2005 which has probably outlived its usefulness, plus an accumulation of workarounds on top. (started as 48b5266e8ff9b472a16290dd923fe24dd0b6989b in the historical repo) Task-number: QTBUG-34760 Change-Id: I2c01269e43636385ee5c89305c6b90f4a7f2c537 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Fix QSpinBox size calculation problem with empty stylesheetsCaroline Chao2013-10-301-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-34305 Change-Id: I3e89dc66446e9f5e9e1810be367830b9df98ab0b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Fix QCommonStyle::subControlRect(SC_GroupBoxCheckBox)J-P Nurmi2013-10-291-1/+1
| | | | | | | | | | | | | | | | | | Make sure the groupbox check indicator doesn't get placed in negative coordinates when font height is smaller than the indicator height. Task-number: QTBUG-33610 Change-Id: Ifad0016e9311f1212cccb6d5971343beb68517c4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Remove sunken state for Android.BogDan Vatra2013-10-251-2/+9
| | | | | | | | | | | | | | | | | | Only QLineEdit always sets the sunken state and on some Android devices (e.g HTC) the line edit is painted as it is pressed. Task-number: QTBUG-29565 Change-Id: I25031ffaadba85cae6b6ff17c0847cb706e23503 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Android: Fix the QSlider handler position.BogDan Vatra2013-10-251-4/+7
| | | | | | | | | | Change-Id: I300f187a94d6c2b6b385c5a129150344f6b805ea Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>