summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mixed up top/bottomRobert Griebl2009-12-091-1/+1
| | | | Reviewed-by: trustme
* QGtkStyle: support for the inner-border property in GtkButtonsRobert Griebl2009-12-081-0/+16
| | | | | | | | This additional padding was not taken into account up to now. It didn't matter for desktop themes, but Maemo5 uses a large (8pix) padding that can not be ignored. Reviewed-by: jbache
* Fixes: Compile fixJens Bache-Wiig2009-12-031-1/+2
| | | | | Task: Turns out d648f23094e61705ceea10b2af526872406d022a was not properly applied.
* Fixes: Support gtk-enable-mnemonics on QGtkStyleJens Bache-Wiig2009-12-031-0/+8
| | | | | | | | Task: QTBUG-6484 RevBy: thorbjorn Details: We currently ignore this property. It now maps to SH_UnderlineShortcut.
* Fix background rendering for read-only comboboxes on Maemo5Robert Griebl2009-11-231-1/+1
| | | | Reviewed-by: jbache
* Fix multiple regressions in QGtkStyle caused by freetype fixesJens Bache-Wiig2009-11-181-13/+19
| | | | | | | | | | | | | | | | Qt 4.6 reports smaller sizes for all fonts which means a lot of the size adjustments QGtkStyle does were now off. I have adjusted most of them including some fixes to menu items themselves. Note that the changes were introduced with this change: 04d18b38c38c5ff623b30366ea08d56128b9b7d0 We now also adapt to GNOME 2.16 style submenu arrow sizes. Combo boxes, line edits, spin boxes and push buttons should finally have a uniform height. Task-number: QTBUG-5753 Reviewed-by: thorbjorn
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-171-0/+8
|\
| * doc: Fixed qdoc errors.Martin Smith2009-11-161-0/+8
| |
* | Fixed QGtkStyle menu bars being one pixel too narrowThorbjørn Lindeijer2009-11-161-4/+0
|/ | | | | | | | | Probably due to the font height being reduced by one pixel earlier, the menu bar now seems to need both pixels added by the QCleanLooks style. Previously it was ignoring this and adding only one, resulting in a menu bar that was one pixel too narrow compared to a real GTK one. Reviewed-by: mae
* QGtkStyle refactoringRobert Griebl2009-11-031-246/+234
| | | | | | | | | | | | The QGtk class has been refactored into a private d class for QGtkStyle. This allows us to re-use a lot of code for the Maemo5 style without changing a single line in QGtkStyle itself plus we can easily add virtual functions where the two styles need to behave different. There shouldn't be any new functionality added (or old functionality lost) by this commit. Reviewed-By: jbache Reviewed-By: Ralf Engels
* Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley T. Hughes2009-10-301-24/+19
|\
| * Fix tab widget painting in QGtkStyle with reverseJens Bache-Wiig2009-10-081-24/+19
| | | | | | | | | | | | | | | | This also adds QStyleOptionTabWidgetFrameV2 so that we do not have to do ugly hacks in the style to obtain it. Task-number: QTBUG-5187 Reviewed-by: ogoffart
* | Remove a paintBox call that should have been moved a few lines down, but was ↵Robert Griebl2009-10-301-3/+0
|/ | | | | | instead copied in commit ea13922 Reviewed-by: TrustMe
* Fix for Gtk+ toolbuttons and sliders.Robert Griebl2009-10-271-7/+29
| | | | | | Maemo5 looks very weird without these patches. Reviewed-By: jbache
* Fix autotest failure on combo box with Gtk+Jens Bache-Wiig2009-09-221-2/+2
| | | | | | | We were not respecting the rect offset on combo box arrows. This was preventing the autotest from happily completing with GTK+ style. Reviewed-by: joao
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Respect "menus_have_icons" property in GTK+Jens Bache-Wiig2009-09-021-0/+5
| | | | | | | | | | | | The default value is planned to be changed in the next minor update to Gtk+ (2.28), hence we need to read this dynamically now. We also added a helper-function to easily read a gconf bool. Note, as a bonus feature I also added support for "buttons_have_icons". Task-number: 260684 Reviewed-by: joao
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Make QGtkStyle react properly to font changes in GNOMEJens Bache-Wiig2009-08-101-1/+1
| | | | | | | | | | | | | | | | | | We only reacted to font changes before when the whole theme changed. Two things had to be fixed to support this. We need to check if the font changed in QGtkStyle::updateTheme and we need to make sure that QApplication does not reset these settings for us. Reviewed-by: joao
* | Introducing icon theme supportJens Bache-Wiig2009-08-101-40/+56
| | | | | | | | | | | | | | | | | | | | | | | | Added some static functions to QIcon to support desktop themes based on the freedesktop spec. It is not intended to replace KIcon and the intention is to use it when available to share icon cache between applications. Applications currently using icon themes are Assistant, Designer and the textedit demo. Reviewed-by: ogoffart
* | Compile on embeddedOlivier Goffart2009-07-221-1/+1
| |
* | Support for very large range in QProgressBarOlivier Goffart2009-07-221-2/+2
| | | | | | | | | | | | Regression since my last commit. Task-number: 152227
* | Simplify the computation of the QProgressBar progress.Olivier Goffart2009-07-221-2/+2
| | | | | | | | | | | | | | This is also a work around for a bug in gcc on powerpc (embedded-linux) Task-number: 258358 Reviewed-by: jbache
* | Allow picking up tool button style from the systemJens Bache-Wiig2009-07-161-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | KDE and GNOME has the concept of a default tool button style that can be set system-wide. Qt currently allways default to IconOnly. I have added an optional Qt::ToolButtonSystemDefault value so you can opt-in to respect the system setting. We did not change the default because a lot of apps will look odd when for instance text is beside icons and the descriptive text is too long. Task-number: 237864 Reviewed-by: ogoffart
* | fix build on linuxThierry Bastian2009-07-151-11/+1
| |
* | Merge branch '4.5'Marius Storm-Olsen2009-06-301-2/+1
|\ \ | |/
| * Fix coverity warningJens Bache-Wiig2009-06-291-2/+1
| | | | | | | | | | | | | | | | Coverity was complaining because we were not checking the return value of find() but instead using the pixmap handle to check the result. This makes the call more consistent Reviewed-by: mgoetz
* | Clean up the font hash and palette hash stuff.Norwegian Rock Cat2009-06-231-1/+0
| | | | | | | | | | | | | | | | | | These are used enough (at least on the mac) to justify them being accessible in a private header. As a bonus it "hides" the actual container being used, so we could potentially sway it out with something different. Reviewed by: Jens Bache-Wiig
* | Use QTransform more efficiently.Bjørn Erik Nilsen2009-06-181-2/+1
| | | | | | | | Reviewed-by: Samuel
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-11/+8
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
| * Improved styling of expander arrows with Gtk+Jens Bache-Wiig2009-06-161-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation was based on the GtkExpander widget. However we do not have such a widget and the primary use case is for expanders inside item views. Hence it makes sense to base it on gtktreeview instead. As I can not reproduce the crash with any recent versions of cleanice I will remove the workaround as well. omment and edit as applicable ]---| Task-number: 256146 Reviewed-by: Thorbjørn
* | Integrating QProxyStyleJens Bache-Wiig2009-06-121-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | This class adds convenient support for proxy styles in Qt. Note that to support proper proxying, styles now call their functions through proxy() so that the proxy regains control over subcomponents. Note that there is a small price to be payed by the extra function call which can at the cost of readability be redirected to the private class member in the future. Task-number: 229556 Reviewed-by: trond
* | Fix focus frame on combobox on non-Windows stylesOlivier Goffart2009-06-091-1/+1
| | | | | | | | | | | | | | | | | | State_KeyboardFocusChange only makes sens on Windows. Follow the logic on the combobox as in PE_FrameFocusRect in the QWindowsStyle Task-number: 255482 Reviewed-by: jbache
* | Removed the internal UsePixmapCache flag in the style code.jasplin2009-06-041-1/+0
| | | | | | | | | | | | | | | | In the style code, the internal UsePixmapCache flag made no sense in practice, so it was removed. A fortunate side-effect of the patch is that the code is now accepted by Sun CC 5.5. Reviewed-by: jbache
* | improved string operations all over the placeThierry Bastian2009-05-281-1/+2
|/ | | | | used character operations whenever possible better usage of QLatin1String
* Fixed a possible assert in QGtkStyleJens Bache-Wiig2009-05-271-32/+31
| | | | | | | | | | | We now set and unset the GTK_HAS_FOCUS flag on the same painting call only if focus is set instead of resetting it on each painting call. This is a tiny optimization but also kills a possible assert on certain versions of Gtk+ (as reported with Red Hat Enterprise Linux 5). Task-number: 254614 Reviewed-by: denis
* Fix a painting issue in the QGtkStyle statusbarJens Bache-Wiig2009-05-261-1/+1
| | | | | | | | | | We should use the "statusbar" string when we draw the sizegrip. Since gtkstatusbar is the only gtk widget using the paint_resize_grip and it uses the "statusbar" string itself it should be safe to assume this. Task-number: 254535 Reviewed-by: rosch
* Fixes a potential crash when changing system palette with QGtkStyleJens Bache-Wiig2009-05-221-6/+7
| | | | | | | | | The problem was that we installed an eventfilter regardless if the gtk symbols were defined or not. Instead we now initialize and check for the symbols before we install the filter. Task-number: 254342 Reviewed-by: ogoffart
* QGtkStyle: Fix broken transparency on line edits in ClearlooksJens Bache-Wiig2009-04-221-2/+3
| | | | | | | | | This basically uses a workaround to hint to our gtk theme that we do not want it to fill our line edit backgrouns with the background brush. This was suggested by Benjamin berg. More information can be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=405421 Reviewed-by: Tor Arne
* GTK: Fix line edit background color with custom brushJens Bache-Wiig2009-04-151-1/+1
| | | | | | | We should allways use the brush and not the color if possible. Task-number: 240842 Reviewed-by: nrc
* Fixed painting issues with draggable tabsJens Bache-Wiig2009-04-151-3/+6
| | | | | | | | | | | This fixes a few of the remaining glitches tabbar animations have: * We no longer grab tabs but paint them through QStyle. This makes tabs work and animate correctly when they are outside the visible region. * Buttons now correctly follow tabs when dropped * Gtkstyle recieved some polish to make it look more native. Task-number: 247694, 251166 Reviewed-by: nrc
* BT: Fix a painting glitch in gtk combo boxJens Bache-Wiig2009-04-081-0/+4
| | | | | | | This improves the look of combo box with gtk style which is somewhat a regression from 4.5.0 since we did not style this part before. Reviewed-by: nrc
* BT: Compile without QT3SUPPORTJens Bache-Wiig2009-04-071-1/+1
| | | | Reviewed-by: ogoffart
* QGtkStyle: Fix styling and palette issues related to combo boxJens Bache-Wiig2009-04-031-5/+35
| | | | | | | | | | | | | | | | | | | | | | Well actually this change is a bit bigger than just that. *We no longer override the palette you provide in polish so it should be a bit more frienly toward custom application changes. * Another issue was that we would generate the palette information when we got the style callback from gtkButton but then the line edits might not yet have been polished. Hence we now return from the callback and instead post the update for later. * We had to modify the PE_Frame entry to draw a raised menu when the custom combo box delegate was used. * We now simply ignore custom qtconfig palette entries when using GtkStyle since they only cause trouble with it. Task-number: 250142 Reviewed-by: nrc
* Improved stylesheet support for setting background and foreground rolesJens Bache-Wiig2009-04-021-1/+9
| | | | | | | | | | This makes sure that style sheets set both ButtonText and WindowText roles for all widgets. This fixes among other things the fact that you could not configure text colors for combo box popups on Mac, Gtk and CleanLooks or set the background for the whole scrollbar. Task-number: 160713 Reviewed-by: ogoffart
* QGtkStyle: Support styled QFrameJens Bache-Wiig2009-03-251-0/+65
| | | | | | | | | | This makes QGtkStyle style QFrame. In order to avoid negatively affecting the performance we cheat by using a border image without the center part filled. GtkScrolledWindow style is used as QFrame is generally mapped to item views. 249363 ogoffart