summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qmacstyle_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Mac: Fix crash when using style to draw on other things than widgetsRichard Moe Gustavsen2010-08-101-0/+3
| | | | | | | | When drawing a complex control using the style, you are allowd to skip giving a widget as the last argument. But when doing so, it caused a crash in the mac style. Reviewed-by: Fabien Freling
* Mac: fix regression from 65a673f that makes some buttons unclickableRichard Moe Gustavsen2010-08-041-0/+10
| | | | | | | | | If a button has a small gemoetry, the mac style will reender it as flat. Change 65a673f did not take this logic into account when massaging the hit rect of the button. This patch will. Task-number: QTBUG-10401 Reviewed-by: cduclos
* Fix for a leak in the mac style.Denis Dzyubenko2010-06-211-1/+1
| | | | | Task-number: QTBUG-11550 Reviewed-by: Morten Sørvig
* Merge remote branch 'origin/4.7' into oslo-staging-1Aaron McCarthy2010-05-241-1/+1
|\ | | | | | | | | Conflicts: src/gui/styles/qmacstyle_mac.mm
| * Compile with gcc 4.0.1Olivier Goffart2010-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | qstylehelper_p.h now includes qstringbuilder.h This triggers a gcc 4.0.1 bug when doing addition or % on annonymous enum - include qstylehelper_p.h last to avoid errors in 3rd party header - explicitly cast enums to int in qwindowsstyle.cpp Reviewed-by: Thierry
* | Removing unneeded qDebug statement.Carlos Manuel Duclos Vergara2010-05-211-1/+0
| | | | | | | | Reviewed-by: Richard Moe Gustavsen
* | Fixing incorrect addition of public API symbols.Carlos Manuel Duclos Vergara2010-05-211-146/+35
| | | | | | | | | | | | | | | | This commit is related to 49a6f4a7d87def3816cebf0115ddadf43e9c4d01 and contains all the files that were modified. The previous commit contained only the newly added file. Reviewed-by: jbache
* | Improve look and feel of itemviews on macJens Bache-Wiig2010-05-201-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fixes are neccessary and requested by Qt Creator and should go into 4.7.0. The fixes involved is: - positioning of disclosure arrow in treeviews - spacing between icon and text label - added 2 pixel spacing between item view items Note that native cocoa views tend to use 3 pixel spacing. We considered this and decided on leaving it at 2 which is what you see in finder list views, XCode among other places. It also makes the change a bit less radical. Reviewed-by:cduclos Task-number:QTBUG-10190
* | QPushButton's click area exceeds the button area by far on Mac OS XCarlos Manuel Duclos Vergara2010-05-201-16/+17
|/ | | | | | | | | | | | | The problem is the "rounding" of buttons in OSX. To achieve this we add some padding to the buttons, therefore creating an inner rect for the widget. The common hitButton(...) method found in QAbstractButton just checks the normal rect of the widget. What this patch does is to reimplement hitButton(...) in QPushButton, but only for the Mac case. In this reimplemented method I calculate the inner rect and check if the hit point is inside that rect or not. Task-number: QTBUG-10401 Reviewed-by: Richard Moe Gustavsen
* Fix off-by-one in text layouts and widget size hints on MacEskil Abrahamsen Blomfeldt2010-05-101-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | The mac font engine was made to return fractional values. This has exposed a few bugs where the rounded height of the font was used for text layouts and widget size hints. Since a fractional part of the font's height also creates pixels, rounding the height down in these cases is always wrong. The biggest culprit was QScriptLine::height. This is used to lay out text lines and returning a fractional height created problems all over the place. Rather than ceil the number in all places where it is used, we simply return a ceiled value for the line's height. In 4.6, this value would be qRound(ascent)+qRound(descent)+1, which would in some cases cause the previous and current line to overlap by one pixel. By ceiling the sum of the two, we guarantee that the text line contains the complete bounds of the font. A note about the removal of the code that gets the font metrics for QSmallFont: The condition would never be true since this is inside a branch which is only evaluated if fontIsSet is true. Task-number: QTBUG-9971 Reviewed-by: Gunnar
* Improve itemview appearance on MacJens Bache-Wiig2010-04-201-5/+11
| | | | | | | | | | | | This fixes two significant issues with the mac look and feel. * Remove superfluous white inner border from item views. This makes items fill all the way to the border. * Remove double border for item view headers. We now clip headers properly to make them blend with the outer border. Reviewed-by: Morten Sørvig Task-number: QTBUG-10047
* Fix the bug where the ampersand symbol would be discarded.Fabien Freling2010-03-261-2/+2
| | | | | | | | We are now checking that the QAction is not related to the About or Quit button on Mac OS X Task-number: QTBUG-7540 Reviewed-by: Morten Sorvig
* Tab color fix for document mode on Snow Leopard.Robert Griebl2010-03-191-4/+6
| | | | | | | The window frame/toolbar color is different (a bit lighter) for snow leopard, so we need to adjust the tab color in document mode . Reviewed-by: Richard Moe Gustavsen
* Fixed cosmetic glitch in QTabBar label's renderingGabriel de Dietrich2010-02-231-1/+1
| | | | | | This seems to have appeared after commit 3baf7b981a8f40ed. Reviewed-by: Olivier
* Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-091-2/+8
|\ | | | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
| * Another fix for the non unified title+toolbar regarding text under iconsAndy Shaw2010-02-041-2/+8
| | | | | | | | | | | | | | | | This makes the case where there is text under the icons in toolbuttons and the title and toolbar is not unified on Mac. This was a regression against Qt 4.5.x Reviewed-by: jbache
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Olivier Goffart2010-02-041-6/+15
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: examples/assistant/simpletextviewer/findfiledialog.cpp qmake/generators/symbian/symmake.cpp tools/assistant/lib/qhelpgenerator.cpp tools/assistant/lib/qhelpsearchquerywidget.cpp translations/translations.pri
| * Fixed potential crash in mac styleJens Bache-Wiig2010-02-021-3/+5
| |
| * Fix missing non-unified toolbar margins on MacJens Bache-Wiig2010-02-021-6/+13
| | | | | | | | | | | | | | | | | | The tool bar appearance have regressed in 4.6 for applications that do not utilize the unified tool bar appearance. This fix restores the margin and spacing to their 4.5 appearance. Task-number: QTBUG-7831 Reviewed-by: morten
* | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-011-72/+104
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Fix header labels on mac with rtlJens Bache-Wiig2010-01-281-2/+0
| | | | | | | | | | | | | | | | | | The removed code simply reduces the size of the rect when running with RightToLeft without compensating anywhere else. It seems to be a leftover from a previously removed piece of code. Reviewed-by: richard Task-number: QTBUG-6882
| * Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash.Carlos Manuel Duclos Vergara2010-01-261-72/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem here is the fact that we "trusted" the user when the widget type was specified. The fix consists in checking the result of the conversions, if the conversion was successful (i.e. the widget was of the type specified by the user) then we proceed as usual. If the conversion was not successful (i.e. wrong widget type) then we ask the style for a sensible size. I modified this for QPushButton, QSlider and QToolButton. Task-number: qtbug-7522 Reviewed-by: jbache
* | Fix header labels on mac with rtlJens Bache-Wiig2010-01-281-2/+0
| | | | | | | | | | | | | | | | | | The removed code simply reduces the size of the rect when running with RightToLeft without compensating anywhere else. It seems to be a leftover from a previously removed piece of code. Reviewed-by: richard Task-number: QTBUG-6882
* | Merge branch 'master' into staging-1-masterPaul Olav Tvete2010-01-251-5/+19
|\ \ | | | | | | | | | | | | Conflicts: doc/src/getting-started/installation.qdoc
| * \ Merge branch '4.6'Thiago Macieira2010-01-131-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| | * Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-1/+1
| | |\ | | | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | | * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| | * | Fixes warning in the QMacStyleOlivier Goffart2010-01-111-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warning such as QFont::setPointSizeF: Point size <= 0 (-1.000000), must be greater than 0 because the font size might be specified in pixel, and pointSizeF returns -1 if the font size is in pixel (as documented) Reviewed-by: jbache Task-number: QTBUG-7263
| * | Mac style doesn't honour QStyle::State_HasFocus for non-widgets.Prasanth Ullattil2010-01-071-0/+12
| |/ | | | | | | | | | | | | | | | | This patch draws the focus frame for widgets other than QLineEdit (e.g. for line edits in Webkit). The frame is drawn outside the rectangle passed in the option-rect. Task-number: QTBUG-5530 Reviewed-by: MortenS
| * Offset in MDI subwindow bar buttons under Mac OS 10.6Gabriel de Dietrich2009-11-251-3/+5
| | | | | | | | | | Task-number: QTBUG-5830 Reviewed-by: Richard
* | Remove statusbaritem on Mac OSXJens Bache-Wiig2010-01-211-1/+0
|/ | | | | | | | | The statusbar item should not draw a frame on Mac OSX. The current frame is essentially redundant and results in non-native appearance on Mac. Task-number: QTBUG-3574 Reviewed-by: morten
* Mac: Fixes broken window decorations for QGraphicsProxyWidget.Bjørn Erik Nilsen2009-11-241-2/+2
| | | | | | | | | | | | | The problem was the QMacStyle didn't handle the pixel metric for PM_TitleBarHeight correctly when passing a style option containing an unitialized rect (empty rect). It already had special logic for invalid rects, so the fix is simply to extend the check to also handle empty rects. Auto-test included. Task-number: QTBUG-4160 Reviewed-by: msorvig
* Tabs with corner widgets are drawn incorrectly in document mode on Mac.Prasanth Ullattil2009-10-291-5/+5
| | | | | | | | | | While drawing the tabbar frame, mac style needs the QTabBar pointer to calculate the correct size. Since the QTabWidget also uses the PE_FrameTabBarBase to draw background of the corner widgets, the mac style has to use position passed with the style option. This only works with horizontal tabs. Reviewed-by: Jens Bache-Wiig
* Selected tab is drawn incorrectly on Snow Leopard.Prasanth Ullattil2009-10-271-4/+5
| | | | | | | | | | The default height of tab bar is 22 pixels in Snow Leopard. We used to draw tabs taller than 21 pixels to a pixmap and stretch to the required size. The limit is now changed to 22 pixels (which is the most common use case). The stretched drawing is not perfect in Snow Leopard due to some changes in how HITheme draws tabs. Reviewed-by: Jens Bache-Wiig
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Fix pixel snow on the combo box popup on Snow Leopard.Morten Sorvig2009-09-041-0/+1
| | | | | | | | | On 10.5 and below the pixmap data bytes happened to be initialized by malloc, on 10.6 this is no longer the case. Revby: Gunnar Sletta <gunnar@trolltech.com> Similar to 28f94e1ef94f.
* 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
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-271-3/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp tests/auto/qcombobox/tst_qcombobox.cpp tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp tests/auto/xmlpatternsview/view/MainWindow.cpp tests/auto/xmlpatternsview/view/TestCaseView.cpp tests/auto/xmlpatternsview/view/TestResultView.cpp tests/auto/xmlpatternsview/view/TreeSortFilter.cpp tests/auto/xmlpatternsview/view/UserTestCase.cpp tests/auto/xmlpatternsview/view/XDTItemItem.cpp tests/auto/xmlpatternsview/view/main.cpp tests/auto/xmlpatternsxqts/lib/ASTItem.h tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.h tests/auto/xmlpatternsxqts/lib/ExpressionNamer.h tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.h tests/auto/xmlpatternsxqts/lib/Global.h tests/auto/xmlpatternsxqts/lib/ResultThreader.h tests/auto/xmlpatternsxqts/lib/TestBaseLine.h tests/auto/xmlpatternsxqts/lib/TestCase.h tests/auto/xmlpatternsxqts/lib/TestResult.h tests/auto/xmlpatternsxqts/lib/TestResultHandler.h tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.h tests/auto/xmlpatternsxqts/lib/Worker.h tests/auto/xmlpatternsxqts/lib/XMLWriter.h tests/auto/xmlpatternsxqts/lib/XQTSTestCase.h
| * Fix subControlRect of the Mac style for the QComboBoxBenjamin Poulain2009-08-251-3/+10
| | | | | | | | | | | | | | | | The subControlRect of the arrow and the listBoxPopup where assuming the widget rect is at the origin. Reviewed-by: Richard Moe Gustavsen Reviewed-by: Pierre Rossi
| * Fix the painting of QSpinBox on Mac when the buttons are disabledBenjamin Poulain2009-08-201-0/+1
| | | | | | | | | | | | | | The edit area of the spinbox should take complete surface of the widget when the button symbol is QAbstractSpinBox::NoButtons. Reviewed-by: Richard Moe Gustavsen
| * Fix the painting of QSpinBox on Mac when the buttons are disabledBenjamin Poulain2009-08-201-3/+8
| | | | | | | | | | | | | | The edit area of the spinbox should take complete surface of the widget when the button symbol is QAbstractSpinBox::NoButtons. Reviewed-by: Richard Moe Gustavsen
| * Fix the painting of QComboBox on Mac when the rect is not at the originBenjamin Poulain2009-08-141-42/+60
| | | | | | | | | | | | | | | | | | | | | | | | The style was assuming that the combo box is painted at (0,0). This is not the case when the painting is done in the delegate of an item view. The offset of the rect is now taken into account to paint the style. HIRect has been replaced by QRect when it make sense. Task-number: 00026815 Reviewed-by: Richard Moe Gustavsen
| * On Mac, hitTestComplexControl() return an incorrect value for comboboxBenjamin Poulain2009-08-141-2/+0
| | | | | | | | | | | | | | | | The function hitTestComplexControl() of the mac style returned SC_ComboBoxArrow when the point is not over an element of the widget. Task-number: 252857 Reviewed-by: Richard Moe Gustavsen
| * Fix crash/assert on Mac when painting "small" QPushButtons.Morten Sorvig2009-08-131-0/+7
| | | | | | | | | | | | | | | | | | A QPushButton with a height if (say) three pixels would cause HIThemeGetButtonContentBounds ot return a rect with dimentions {int_min, int_min, 0, 0}. Detect that case and return the button rect instead. Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | spelWarwick Allison2009-08-141-5/+5
| |
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix QMacStyle subControlRect()-reporting for CC_SpinBoxTor Arne Vestbø2009-08-061-3/+9
| | | | | | | | | | | | | | | | | | The mac style ignored the QAbstractSpinBox::NoButtons flag for the SC_SpinBoxEditField sub-control, effectivly always making room for the spinner buttons. Now it's in line with both the Cleanlooks style and the Windows (common) style. Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
* | Move QMacStyle icon handling down to the common style.Norwegian Rock Cat2009-07-171-120/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is more follow the cue of what is done on X11, mainly, if you are creating things like messageboxes or file views, you want them to follow the desktop (yes, you do). If you disable desktop settings aware, you get the old look. This also meant shifting around some functions into qt_cocoa_helpers_mac to make them more readily available instead of living in differnt files. People who use standard pixmap get the old values, but I think that's fine. If you haven't moved onto standardIcon (introduced in 4.1), you don't get the latest bling. Review-by: Jens Bache-Wiig