summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix the size returned by QCommonStylePrivate::viewItemSize() for textBenjamin Poulain2009-08-211-1/+1
| | | | | | | | The size of the text, computed in qreal, was rounded. If the decimal part of the size was < 0.5, a pixel was missing in the size returned. Reviewed-by: Samuel Rødal Reviewed-by: Olivier Goffart
* 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
* Fixed usage of the MITSHM extension for 16 bit X servers.Trond Kjernåsen2009-08-191-3/+6
| | | | | | | | The server color layout test was a bit to harsh, since it excluded 16 bit X11 servers with RGB layout. Task-number: 259846 Reviewed-by: Gunnar
* Fixed rounding error in fillRect() in the raster paint engineEskil Abrahamsen Blomfeldt2009-08-181-11/+7
| | | | | | | | | | | Problem introduced by 7661126bc86ed105c02fd9b084ac5a91f12f10c4, which introduced always rounding up when converting the rectangle's coordinates to integers. This would e.g. cause off-by-one errors for the cursor in QTextDocument. Some code paths depended on the ceiling of the coordinates, and these have been reverted. Task-number: 257914 Reviewed-by: Samuel
* Fix regression in clip path calculation for QGraphicsWidget.Alexis Menard2009-08-181-0/+2
| | | | | | | | | | | | | | | | | | This fixes a regression when computing the clip path for a QGraphicsWidget that clip its children to its shape. The clip path cache use the bounding rect which has a null width and height the very first time on a QGraphicsWidget. This might happen as well for any item that have a null width and height (e.g. QGraphicsRectItem before you set the rect). We should do better in mainline by refactoring this clip path cache and calling it in prepareGeometryChange which should be called when you update the shape and the boundingRect of the item. Do we really need also in 4.6/mainline the clip path as it is now? This should be investigate also. The auto-test cover the problem so we can use it after for refactoring the cached clip path. Task-number: 257232 Reviewed-by: andreas Reviewed-by: bnilsen
* fix WA_DontShowOnScreen bug on Windows CEJoerg Bornemann2009-08-171-1/+1
| | | | | | | We must not retrieve the initial window geometry for WA_DontShowOnScreen widgets with GetClientRect. Reviewed-by: thartman
* Document QAction::MenuRole not working on submenus.Norwegian Rock Cat2009-08-141-0/+5
| | | | | | | We could do it or we couldn't. It's simply a judgement call and I think the comments in the task are a good argument for NOT doing it. Task-number: 227875
* 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
* Fix Menu icons are too large on CocoaDean Dettman2009-08-131-2/+2
| | | | | | | | The magic number 22 was based on windows sized icons, a size of 16 should be correct for mac Task-number: 259289 Reviewed-by: NRC
* Wrapped the XInput include with an ifdef.Denis Dzyubenko2009-08-121-0/+4
| | | | | | | | That should fix compilation on platforms that do not have xinput headers installed. Reviewed-by: Thiago Macieira (cherry picked from commit 0a13188468997d6c3253db5b29f05a119945f131)
* respect QAbstractSpinBox::NoButtons in windowsce / windowsmobile stylesJoerg Bornemann2009-08-122-1/+9
| | | | | | | Code is adapted from QCommonStyle which handles this case for other styles. Reviewed-by: thartman
* fix QTextFormat::doubleProperty where qreal is floatJoerg Bornemann2009-08-121-3/+4
| | | | | | | | This function was too strict. It returned 0 if the property wasn't of type QVariant::Double. Now it tests for QMetaType::Float too. Reviewed-by: kh1 Reviewed-by: mauricek
* fix decoration of DontShowOnScreen widgets on Windows CEJoerg Bornemann2009-08-121-1/+1
| | | | | | | | Widgets with the WA_DontShowOnScreen attribute must not have a window decoration. Autotest: tst_QWidget::initialPosForDontShowOnScreenWidgets Reviewed-by: thartman
* Revert "Frame property for QDateTimeEdit can be set independently of"Matthew Cattell2009-08-111-1/+0
| | | | | | This reverts commit 6844dea0cb583a86bc72e7f008720ab76deef040. added to wrong branch. should be in 4.6 but this was added to 4.5
* Frame property for QDateTimeEdit can be set independently ofMatthew Cattell2009-08-111-0/+1
| | | | | | | | | | | calendar popup A frame was always drawn around the QDateTimeEdit editor if a popup calendar had been set. QStyleOptionsComboBox options are being set in paintEvent and initialised from the properties of QStyleOptionsSpinBox but were missing the frame bool property. Now, if the user sets a frame on the QDateTimeEdit, this property will be consistent with setFrame() property of the QDateTimeEdit widget.
* Update URL of online documentation.Jason McDonald2009-08-113-3/+3
| | | | Reviewed-by: Trust Me
* Eliminate some mentions of Trolltech.Jason McDonald2009-08-112-12/+12
| | | | Reviewed-by: Trust Me
* Qt's domain name is now qt.nokia.com.Jason McDonald2009-08-114-6/+6
| | | | Reviewed-by: Trust Me
* Update license headers.Jason McDonald2009-08-11979-979/+979
| | | | Reviewed-by: Trust Me
* Fix crash in QX11Data::xdndHandleEnter when XGetWindowProperty failsOctavian Voicu2009-08-061-6/+7
| | | | | | | Task-number: 259143 Merge-request: 1119 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix a bug when activating HideNameFilterDetails on Windows filedialog.Alexis Menard2009-08-052-11/+19
| | | | | | | | | | The HideNameFilterDetails was not taken in account for windows file dialog. This patch fix that. For Windows Vista and later we use now the new COMMON_ITEM_DIALOG API (in master) where it add always the filter extension like *.txt so no point to take that flag in account. Task-number: None, during testing Reviewed-by: prasanth
* Fixes hangup when pressing key in QListWidgetOlivier Goffart2009-08-051-0/+7
| | | | | | | | | If there is severals matching items but all of them are disabled, it would have produced an infinite loop. Block the loop once we reach an already matched item. Task-number: 258949 Reviewed-by: Thierry
* Cocoa: Menus show old selected values.Richard Moe Gustavsen2009-08-051-0/+6
| | | | | | | | | | We never told Cocoa that it needed to redraw the window view when a window was shown. This is implicit if the window is shown for the first time, but needs to be done explicit if you hide and show it again. Task-number: 254672 Reviewed-by: bnilsen
* Make file extension case insensitive with the Gtk+ file dialogJens Bache-Wiig2009-08-041-1/+18
| | | | | | | | | | | The Qt dialog treats extension filters as case insensitive where the default behavior of the Gtk+ file dialog is to be case sensitive. The GtkFileFilter allows only simple glob syntax to be used so we basically rewrite the extension string from .xyz to .[xX][yY][zZ]. Task-number: 259155 Reviewed-by: joao
* Fix indentation.Alexis Menard2009-08-041-1/+3
| | | | Reviewed-by:TrustMe
* Fix ancestor flags that are not correctly update when reparenting.Alexis Menard2009-08-041-11/+12
| | | | | | | | | updateAncestorFlags was not reseting the flags if you change the parent that have for instance itemsClipChildrenToShape to a new one that doesn't have that flag. Task-number:258956 Reviewed-by:bnilsen
* Preserved fill rule for perspective mapped strokes in raster engine.Samuel Rødal2009-08-032-0/+3
| | | | | Task-number: 254407 Reviewed-by: Gunnar
* Cocoa with namespace breaks the buildRichard Moe Gustavsen2009-07-311-2/+2
| | | | | | | Added the needed macros around the classnames the way it should be done. Reviewed-by: Prasanth
* Coverty warnings --. This switch was missing a break.Alexis Menard2009-07-301-0/+1
| | | | Reviewed-by:TrustMe
* Allow maximize button on the titlebar for a fixed size windowDenis Dzyubenko2009-07-301-0/+5
| | | | | | | | | On Windows we will add maximize button to the titlebar even if the window has a fixed size if the user explicitely asked for it by setting Qt::CustomizeWindowHint | Qt::WindowMaximizeButtonHint. Task-number: 250188 Reviewed-by: Leonardo Sobral Cunha
* Remove mem leak / warning in the cocoaportRichard Moe Gustavsen2009-07-301-0/+1
| | | | | | Remove mem leak / warning in the cocoaport Reviewed-by: msorvig
* Mac: Fix crash in QCoreTextFontEngineMulti when disabling font kerning.Morten Sørvig2009-07-301-1/+1
| | | | | | CFDictionaryAddValue expects a CFNumberRef, not a pointer-to-CFNumberRef. Reviewed-by: TrustMe
* Unable to change focus between two line edits on macRichard Moe Gustavsen2009-07-301-37/+12
| | | | | | | | | | | | | | | | | | | | This is because we try to decide whether the window cocoa tells us to be active should be active, and if we desagree, we do nothing. The result is that Qt and Cocoa ends up in different states. I decided to remove a lot of the logic that went on in this case, and the resons is: 1. By checking the callplaces to onApplicationWindowChangedActivation, we know that we always have a valid widget pointer, and we know that the widget always is a window (otherwise Cocoa would never tell us that the widget got active). 2. We can never end up doing nothing in this response. The best we can do is to follow what Cocoa tells us. If this turns out to break something, it would probably be better to check why we get an activation call in the first place for a window that should not be activated (e.g. is canBecomeKeyWindow set correctly?) Task: 253610 RevBy: msorvig
* Doc - Renamed the cursor's images to illustrate splitV and splitH properlyKavindra Devi Palaraja2009-07-291-2/+2
| | | | | | Task: 258895 Reviewed-By: Jens Bache-Wiig
* Comment one of my changes from yesterdayRichard Moe Gustavsen2009-07-291-4/+7
| | | | Task-number: 258445
* Regression: QColorDialog crash on Mac when accepting with keyboardRichard Moe Gustavsen2009-07-283-119/+134
| | | | | | | | | | | | | | Basically, the crash happends because we release the dialog when the ok button is clicked. But when the button is clicked with the keyboard (actually cocoa emulates a click when pressing enter), it also tries to do some focus handling on the button afterwards. But at that point, the button is already freed up. With a crash as the result. This patch goes through a lot of the code, and rewrites it so we doesnt free up the cocoa objects before the destructor of the QColorDialog is called. Task-number: 258445 Reviewed-by: msorvig
* Fixed drawImage() so that it doesn't sample outside the source image.Kim Motoyoshi Kalland2009-07-281-4/+4
| | | | | | | | | | | | | | | | In qt_scale_image_16bit() and qt_scale_image_32bit(), when a sample point was located on the border between two pixels in the source image, the sample point was rounded up instead of down. If a sample point was exactly on the bottom or right edge of the source image, the function would therefore sample a pixel outside the image. Because of how the target rectangle is rounded, a sample point will never be exactly on the top or left edge of the source image, so we will not get a similar problem there. I extended the lance test pixmap_scaling.qps. Task-number: 258533 Reviewed-by: Samuel
* Don't use layered windows for non-translucent windowsGunnar Sletta2009-07-281-2/+2
| | | | Reviewed-by: Samuel
* Roll back the fancy updating of translucent windows.Gunnar Sletta2009-07-271-4/+1
| | | | | | | | | | The problem with the fix, though it produces less flicker when resizing, is that it delays telling windows that the window has moved until after the window has been completely repainted. Problem with this is that functions that rely on windows to be up to date will fail until the backbuffer is flushed. This was the case for mapTo/FromGlobal, and potentially other functions too. Reviewed-By: Eskil
* Fix crash when printing to PDF on Qt/MacMorten Sørvig2009-07-271-2/+5
| | | | | | | | | | Priting to PDF would crash for applications built on Leopard when running on Tiger. Add the standard runtime version check to QFontEngineMac::faceId(). Task-number: 251791 Reviewed-by: Richard Moe Gustavsen
* Prematurely creating a dialog as a sheet causes problemsRichard Moe Gustavsen2009-07-242-21/+34
| | | | | | | | | | | | | | Prematurely creating a dialog as a sheet and then calling exec() on it will show a window w/o decorations. The problem is that first telling a window to be a sheet, and then tell it to exec, is unambigious. Because doing the latter implies application modality (when modality is not set), which again implies not using a sheet. Calling exec (and setting modality) will win over window flags, so in this case, we now recreate the window as a normal app-modal dialog. Task: 254524 Reviewed-by: Trenton Schulz
* Fixed crash when vectorpath was polygonal only in raster::stroke()Gunnar Sletta2009-07-241-9/+16
| | | | | | | Polygonal vector paths may have types==null, in which case this would have crashed. Reviewed-by: Eskil
* QPainter::stroke() on raster engine would draw moveto's as linesGunnar Sletta2009-07-231-5/+17
| | | | | | | | | The reason being that there was an assumption that any non-curved path was a continous polyline. For paths with multiple subpaths in it we need to split this up into multiple strokePolygonCosmetic calls. Task-number: 257621 Reviewed-by: Kim Motoyoshi Kalland
* Diagonal dashes are moving when touching the clip boundary.Gunnar Sletta2009-07-231-1/+4
| | | | | | | | | We normally pad the clip rect with the size of the pen and miterlimit to avoid this, but this didn't handle the case where there was a long diagonal dash. We also need to multiply the padding with the longest dash. Reviewed-By: Tom Cooksey
* Implement clipping in the QPaintEngineEx::stroke() function.Gunnar Sletta2009-07-233-6/+11
| | | | | | | This is a huge impact on performance whenever this path is taken. Reviewed-By: Tom Cooksey
* Revert "Added a check that X11 timestamp goes forward only."Denis Dzyubenko2009-07-221-20/+15
| | | | | | | | | | | | | | | In some cases we might get an invalid timestamp that is far away in the future, so remembering it will break all consequent X calls that require a timestamp because it just contains junk (for example clipboard will stop working). This happens with XIM+SCIM pair - whenever we start input method and type something to the widget, we get a XKeyPress event with a commited string, however the 'serial' and 'time' members of the XEvent structure are not initialized (according to valgrind) and contain junk. This reverts commit 2ed015b8a0ffad63f0f59b0e2255057f416895fb. Reviewed-By: Brad
* Fix table borders in multiline tables when printing to PostScript.Gunnar Sletta2009-07-221-2/+7
| | | | | | | | | | | | | I'm not all to happy with this fix, but its the best that one can acheive given the current design. The problem is that QPdfBaseEngine sets a number of states as part of updateState(), but only when we are playing back through the alpha engine. These states are used in some draw functions, also when we are recording in the alpha engine. This leads to the states and their checks being out of sync. So to follow the existing pattern in the code we need to not touch d-> vars prior to a check to usesAlphaEngine. Reviewed-By: Eskil