summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'private/translucentWindows'Jason Barron2009-04-3012-90/+169
|\ | | | | | | | | Conflicts: src/gui/styles/qs60style_symbian.cpp
| * Avoid overwriting a user set palette.Jason Barron2009-04-304-33/+50
| | | | | | | | | | | | | | | | | | | | | | | | The polish(QWidget*) function is called the first time a widget is shown and therefore setting the widget's palette in this function will overwrite the user set palette if one is specified before show() is called. The solution is to break this into two parts, the first part sets the global palette in polish(QApplication*) and this is the part of the palette that is independent of widget. The second part involves adding the widget specific palettes using the QApplication:: setPalette() function that takes a classname and this is done in the polish(QWidget*) function.
| * Small optimization when hiding windows.Jason Barron2009-04-301-3/+4
| | | | | | | | | | | | | | | | | | | | When a window is hidden, it will call releaseBuffer() on the backing store which in turn will resize the window surface to a null rect. In this case, there is no need to update the QImage with the data pointer since it will be updated on the subsequent beginPaint() when the image is resized to a valid size again. This also avoids doing unnecessary locking on the FBSERV heap which still involves a context switch on older versions of Symbian.
| * Some code cleanups after review.Jason Barron2009-04-291-3/+3
| | | | | | | | | | Change these lines of code to either make it more consistent or more readable after review.
| * Undo implementation of setWindowOpacity_sys().Jason Barron2009-04-291-4/+2
| | | | | | | | | | | | | | | | This function was implemented using API from Symbian that will be deprecated. It was never actually suitable anyway since this function cannot be called after the window has been shown and this needs to be a runtime decision for Qt. The solution is to use SetTransparencyAlphaChannel(), but that will come later.
| * Fixes crash when setting geometry on an obscured window.Jason Barron2009-04-291-1/+1
| | | | | | | | | | | | | | Since Qt on Symbian now destroys the backing store when it gets hidden or obscured we need to be careful not to use functions like moveRect() when we don't have a backing store since this function is really a backing store optimization and therefore assumes one exists.
| * Make QPixmap::grabWindow() work for top level windows.Jason Barron2009-04-291-1/+1
| | | | | | | | | | | | Its not enough to mask with Qt::Desktop because this enum value also includes Qt::Window so masking would give us a non-zero result thus causing the 'if' case to resolve to true which is not what we want.
| * Fix compilation of QS60Style after bad merge.Jason Barron2009-04-281-1/+1
| | | | | | | | | | | | The previous commit on this file broke compilation. It should have called setBrush() instead of setColor() to set the Window role of the palette to use a texture brush.
| * Get transparency working by clearing the window surface.Jason Barron2009-04-281-1/+22
| | | | | | | | | | | | | | | | | | This is duplicated code from the raster paint engine's beginPaint() function. For translucent windows the previous contents must be cleared from the backing store before the new content is painted. This class should probably be re-written as a subclass of the raster version. The reason we cannot use that implementation directly is because we cannot use QNativeImage because it doesn't provide anywhere we can do locking.
| * More work on translucent windows.Jason Barron2009-04-283-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | One step closer to semi-transparent windows, but not there yet. This gets the transparent contents into the window, but the previous contents are not cleared so it keeps drawing the backing store on top of itself each time a Draw() is done. SetBackgroundColor() indicates to WSERV that our window is semi-transparent. We also make sure not to use 'EDrawModeWriteAlpha' when the widget is non-opaque since this actually changes the alpha channel on the frame buffer (not the window) so the gives undesired results. It's a faster draw mode though so we should use it where we can.
| * Fixes: Add support for translucent windows in Symbian.Jason Barron2009-04-286-3/+57
| | | | | | | | | | | | | | | | | | | | | | Warning, this is completely untested! Details: This should (in theory) get translucent windows working but this hasn't been tested yet. The emulator environment seems to return only 16ColorMU display modes which implies the window is opague so Qt ignores the translucent flag. HW seems to create 16ColorMA windows, but it hasn't been tested there yet either (no time).
| * We previously had some hacks in this function to avoid creating aJason Barron2009-04-281-2/+4
| | | | | | | | | | | | backing store with the ARGB32 format (which is slower to draw on), but we actually want this in some cases so let's do this properly and move the hacks somewhere else.
| * Fix background painting.Jason Barron2009-04-283-42/+26
| | | | | | | | | | | | | | This is a reverted patch that has been rebased on to another branch and then caused conflicts so it might contain an error or two. Basically we need to store the background texture from the style into the palette so that it can be replaced by applications that don't want it.
* | S60Style: Build break fix for 3.2SDK environment (it is lacking some skin ↵Sami Merilä2009-04-301-9/+9
| | | | | | | | IDs that are available in 3.2RnD environment).
* | S60Style: Layout spinbox so that up and down buttons are side-by-side, not ↵Sami Merilä2009-04-301-13/+66
| | | | | | | | on top of each other.
* | S60Style: buildbreak fix - missing lines from commit ↵Sami Merilä2009-04-301-3/+6
| | | | | | | | d333404c72aa6c707cf389899999f2247454b824
* | S60Style: Use title font for GroupBox title.Sami Merilä2009-04-291-0/+5
| |
* | S60Style: Styled QToolBar implementation.Sami Merilä2009-04-294-41/+258
| |
* | Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-publicMiikka Heikkinen2009-04-292-13/+29
|\ \ | |/
| * Enable dynamic [de|con]struction of window surfaces based on visibilityJason Barron2009-04-282-13/+29
| | | | | | | | | | | | | | | | | | When a window becomes completely obscured either because it has been hidden or another window is completely covering it, the backing store should be deallocated to save memory and then re-allocated when the window is later made visible again. Reviewed-by: Iain <qt-info@nokia.com>
* | Basic optimizations to qdrawhelper for RVCT builds:Miikka Heikkinen2009-04-292-37/+69
|/ | | | | | | - Force static inline methods to be actually inline - Force ARM code for strategic methods RevBy: axis
* Removed setting the unnecessary parent for menu structuresMarkku Luukkainen2009-04-281-1/+0
|
* Fixed wrong menu showing up on S60 while launching a dialog.Markku Luukkainen2009-04-283-11/+38
|
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-04-27134-2634/+3900
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
| * Drag and drop examples not working correctly in CocoaPrasanth Ullattil2009-04-243-27/+62
| | | | | | | | | | | | | | | | | | | | | | In the updated examples, the drag operation is changed in the drop-event handler, which was not handled correctly in the Cocoa. This is now supported for drag and drop from same application. If the drop was to another application, the drag will return the result from the last drag-move event. Task-number: 252103 Reviewed-by: nrc
| * Fix clipping bug in raster paint engineGunnar Sletta2009-04-241-0/+14
| | | | | | | | | | | | | | | | | | If we have a rect-clip where we actually had spans (used for cleartype) and then reused that clipdata, we would never re-create the spans, which would mean that future drawing would be filtered based on the old clip Reviewed-by: Samuel
| * Revert "Removed dead code."jasplin2009-04-231-0/+2
| | | | | | | | | | This reverts commit 99d243860548d6be8a68dfd027c51530351d12cb. Needed because of commit b51dd5a7b328291c5dbda540ce228e7d867662cb.
| * Revert "Fixed key sequence eating behavior for QShortcut and QAction."jasplin2009-04-234-50/+27
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 031adeaf42ddaef8d01338f6c59ba97170be5d53. The patch had some unforeseen side-effects for Creator. It may also affect other existing applications in a similar way. For now, this behavior (eating key sequences for disabled shortcuts) should be achieved using a local workaround in creator. Reviewed-by: mariusSO Task-number: 251246
| * Disable MIT-SHM usage on BGR server layouts under X11.Trond Kjernåsen2009-04-231-6/+12
| | | | | | | | | | | | | | | | Since the raster engine always assumes RGB layout in a QImage, we can't support this out of the box. Task-number: 248720 Reviewed-by: Samuel
| * Carbon/Cocoa: It is possible to resize a widget above its maximum sizeRichard Moe Gustavsen2009-04-232-39/+50
| | | | | | | | | | | | | | | | | | | | This is not strange since we never did anything to limit a resize within the max min boundries. This patch factores out the code that ensures this into a private function that is called both as a reaction to a resize event, but also if resize is done programatically. Task-number: 251893 Reviewed-by: Trenton Schulz
| * Removed dead code.jasplin2009-04-231-2/+0
| | | | | | | | Reviewed-by: TrustMe
| * Show filter extensions in the GTK file dialog if no name is providedJens Bache-Wiig2009-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | In the GTK+ file dialog filters are only represented by names such as "All files", while the actual extensions are hidden. You can create a filter without a name in Qt however so in this case we have to fall back to showing the file extensions instead. Task-number: 251928 Reviewed-by: rosch
| * Don't emit QApplication::focusChanged for no reasonThorbjørn Lindeijer2009-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt::NoFocusReason is used when Qt temporarily moves the focus to the QMenuBar while switching from one widget to another. While this did not result in a QFocusEvent, it did result in emitting the QApplication::focusChanged signal. This in turn caused a slowness in Qt Creator, since it wanted to update the current context and find filter. The fix here makes sure the focusChanged signal is not emitted when the focus reason is Qt::NoFocusReason, since these focus changes are not interesting for the application. Reviewed-by: mae
| * Prevent QTransform::type() from returning TxScale instead of TxProject.Samuel Rødal2009-04-221-2/+2
| | | | | | | | | | | | | | | | We have code that assumes that m33 = 1 if the type is TxScale. Instead of changing all that code it's better to just return TxProject as type when m33 is different from 1. Reviewed-by: Simon Hausmann
| * 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
| * Fix QPrinter::pageRect() for Windows printers, when fullPage() is set.Trond Kjernåsen2009-04-221-1/+1
| | | | | | | | | | | | | | | | | | When QPrinter::fullPage() was set, pageRect() returned the same as paperRect(). Under Windows, there is always a non-printable area that was not taken into account in the fullPage() case. Task-number: 248881 Reviewed-by: Kim
| * Doc fixesJoão Abecasis2009-04-221-2/+3
| | | | | | | | Reviewed-by: Thiago
| * Fix Transformed driver on 8-bit displaysPaul Olav Tvete2009-04-223-1/+5
| | | | | | | | | | Task-number: 250971 Reviewed-by: Tom
| * Fix crash in drawPixmap when painting on a null pixmapSamuel Rødal2009-04-221-3/+3
| | | | | | | | | | | | We need to check if the engine is null before we do the thread test. Reviewed-by: Thiago
| * Fix double entries in the sidebar of QFileDialogAlexis Menard2009-04-221-0/+4
| | | | | | | | | | | | | | | | | | The problem is QUrl == operator is case sensitive. On Windows we don't want double entries for C:\dev or c:\dev so i convert the url in lower case and compare them (on Windows only) to avoid duplicate entries. Task-number:226483 Reviewed-by:jasplin
| * BT: Revert "Fixes: Don't fill the pixmap because we will copy the cache ↵Andreas Aardal Hanssen2009-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into it." This reverts commit 0985805ab3c7de5b15c115a98afb15944b6d93b9. The Elastic Nodes example shows a black background for the cache pixmap if the call to fill isn't there. Alexis and I both agree that it makes no sense that we fill the pixmap with transparent pixels instead of just drawing with QPainter::CompositionMode_Source, but since this regression was introduced after 4.5.0 was released we must revert before we investigate further. Reviewed-by: Alexis
| * BT: Fix update regression for cached QGraphicsItem (Elastic Nodes stuck)Andreas Aardal Hanssen2009-04-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug in 4.5.0 where cached items that call update() after they have been moved or transformed failed to get a call to paint(), so the last cache image was used to draw. The easiest way to reproduce this bug is in the Elastic Nodes example. If you press, wait, then release, the nodes will consistently move to sunken state, then back to normal state. But if you click quickly while moving the mouse, the nodes will stay sunken. The bug was that the item was marked as dirty as a result of being moved, and when the mouse button was released, the node item's call to update() was discarded, as the item was "already dirty". The fix is to allow invalidation of the cache even if the item is marked as dirty. Reviewed-by: bnilsen
| * BT: Make things work on 10.3Norwegian Rock Cat2009-04-211-1/+1
| | | | | | | | | | | | The #ifdef was typed wrong. Reviewed-by: Prasanth Ullattil
| * We don't need to call two times itemChange when an item is deleted.Alexis Menard2009-04-211-6/+0
| | | | | | | | | | | | | | | | | | Previously we were calling two times itemChange on the parent to give QGraphicsItem::ItemChildAddedChange. We don't need that. One is enough. BT : yes Task-number: BT Reviewed-by: Andreas
| * Fix a problem where QPrintDialog/Unix didn't update print-to-file states.Trond Kjernåsen2009-04-211-1/+3
| | | | | | | | | | | | | | | | | | Setting a QPrinter to print to e.g. a PDF file and then passing the QPrinter object to a QPrintDialog didn't update the printer combobox and filename lineedit states correctly. Task-number: 224728 Reviewed-by: Samuel
| * Fix non-opaque text from widget palette being blitted, not blended.Samuel Rødal2009-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | QPainter inherits some properties from the widget, among other font and pen. These are set in the painter's state in initFrom(), but in 4.5 we forgot to call QPaintEngineEx::penChanged() to let an extended paint engine know that the pen has changed. This caused the raster engine to believe it could blit non-opaque text, due to the fast_text flag not being correctly updated. Task-number: 251534 Reviewed-by: Paul
| * There is no way to delete a invalid entry in the sidebar of QFileDialog.Alexis Menard2009-04-212-4/+30
| | | | | | | | | | | | | | | | | | | | | | We can't remove an item in the sidebar if the bookmark is not valid (i.e. link to a non existing directory). ItemViews doesn't allow you to have disabled items and to select them at the same time, so i have implemented a delegate that paint in gray if the bookmark is invalid. So you can click on it and delete it. Task-number: 251341 Reviewed-by: jasplin
| * Fix a bug in QFileDialog sidebar when the bookmark has an hidden parentAlexis Menard2009-04-212-1/+6
| | | | | | | | | | | | | | | | | | | | | | If the bookmark in the sidebar has an hidden parent and the QFileDialog is set up to not show hidden files, then clicking on the bookmark move the current dir to root (like if the bookmark was invalid) instead of entering in the dir. The fix was to fetch the parent dir and the bookmark dir when the user select it in the sidebar. Task-number: 251321 Reviewed-by: jasplin
| * Fix tabbar issues with Oxygen styleJens Bache-Wiig2009-04-201-32/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oxygen style was looking a bit broken when using 4.5 features such as close buttons and icons. This was because it re-implements the tabbartablabel primitive we needed to ensure spacing for the buttons. We had to modify the way we draw tabs slightly to make it more backward compatible so that oxygen get the same region as before and we ensure space for it in the CE_TabBarTab case instead. Note that the drawback to this approach is that the focus rect needs to be moved out of the tablabel and into the CE_TabBarTab case so it covers the entire tab which can potentially cause problems if people depend on the label to draw the focus rect. However the new case is also more consistent with how buttons draw their focus. Task-number: 251635 Reviewed-by: nrc
| * Fixed key sequence eating behavior for QShortcut and QAction.jasplin2009-04-204-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A disabled QShortcut should eat its key sequence even for complex sequences like "Ctrl-E 1". For example, a line edit with such a shortcut should not display 1 after typing "Ctrl-E" and then "1". The patch achieves this essentially by moving more of the decision making (of whether to eat the key secuence) from shortcutmap.cpp to qhortcut.cpp. Moreover, an invisible QAction should not eat any of its key sequences (primary nor alternates). In the example above, the line edit would display 1 when typing this sequence for an invisible action. The patch achieves this by temporarily unregistering all of the action's shortcuts while the action is invisible. Reviewed-by: mariusSO Task-number: 251246