summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Made native Pan gesture work on Windows.Denis Dzyubenko2009-11-033-53/+61
| | | | Reviewed-by: trustme
* Fix tab widget painting in QGtkStyle with reverseJens Bache-Wiig2009-10-081-2/+12
| | | | | | | | 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
* Tabs with corner widgets are drawn incorrectly in document mode on Mac.Prasanth Ullattil2009-10-291-2/+2
| | | | | | | | | | 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
* Wrong font used when moving a tab in document mode.Prasanth Ullattil2009-10-281-0/+1
| | | | | | | | Dragging is handled by a seperate window in document mode. The currently selected tabbar item is drawn to a pixmap for this purpose. That paintdevice was not initialized correctly. (e.g. font) Reviewed-by: Trond
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into ↵Bradley T. Hughes2009-10-282-3/+25
|\ | | | | | | 4.6-WM_NULL-driven
| * QTabbar is not behaving (painting) like native ones on Mac.Prasanth Ullattil2009-10-272-3/+25
| | | | | | | | | | | | | | When a tab is clicked and mouse is moved outside that tab, it should be drawn as normal (not in sunken state). Reviewed-by: MortenS
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6axis2009-10-271-10/+10
|\ \
| * \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6axis2009-10-275-8/+5
| |\ \ | | |/
| * | Fixed select softkey for comboboxes (QTBUG-4702).Janne Anttila2009-10-271-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The created keyed actions are passed to wrong widget if this pointer is passed insted of itemView. Also create softkey actions in setItemView method instead of constructor in order that custom items views are also working correctly. Task-number:: QTBUG-4702 AutoTest: All QComboBox tests passed Reviewed-by: Jason Barron
* | | Implement support for wheel delta with finer resolution than 15 deg.Richard Moe Gustavsen2009-10-271-24/+20
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, Qt, in many places, does not really understand that a mouse wheel, or touch pad, might operate on a much higher granularity than 15 degrees (that is, a delta of 120). This is clear disadvantage on mac, since the mighty mouse, and track pad, got a resolution that is close to 1 degree. This is called pixel scrolling. This patch first and formost changes the implementation of QAbstractSlider::wheelEvent to _really_ understand what to do when delta is less than 120. Rather than accumulate delta until 120 is reached, then scroll with a value equal to: offset * step * QApplication::wheelScrollLines (default = 3), we multiply offset directly, before waiting for 120. This means that event tough offset is below 120, multiplying it with wheelScrollLines and step will very often give a value over 120, menaing we can scroll much earlier and _much more_ fined grained. This also fixes some auto tests that was ifdeffed out because of specialised mac code written inside this function from before. (NB: we still plan to introduce a new event for pixel scrolling, perhaps for Qt-4.7) Rev-By: Andreas Rev-By: denis
* | Line spacing fixesJoerg Bornemann2009-10-235-8/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* QTextEdit: Fix the wrong order for call of Qt::WA_InputMethodEnabled in ↵Liang QI2009-10-221-1/+1
| | | | | | | | | setReadOnly. Should set Qt::WA_InputMethodEnabled after set the flags, just because shouldEnableInputMethod() will read the flags. Task-number: QTBUG-4917 Reviewed-by: Shane Kearns
* The QMenuPrivate::activationRecursionGuard has to be a boolean.Marius Bugge Monsen2009-10-211-1/+1
| | | | Reviewed-by: Trust Me
* Make QMenu::activateCausedStack() exception safe.Marius Bugge Monsen2009-10-211-3/+11
| | | | | | Use an internal class to reset the activationRecursionGuard when the scope is closed. Reviewed-by: Leo Cunha
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Marius Bugge Monsen2009-10-215-6/+44
|\
| * Cleaned up the API of the Symbian event hooks.axis2009-10-212-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two major points were: - Replacing "s60" with "symbian" in all event handling functions, since there is nothing S60-specific about them. - Replace the Symbian event types with the encapsulating QSymbianEvent container. This allows us to cope with more types of events in the future without having to add new virtual functions. AutoTest: QWidget passed Task: QT-1156 RevBy: Jason Barron RevBy: Shane Kearns RevBy: Sami Merila
| * Mac: fix bug when reparenting non-native menu barsRichard Moe Gustavsen2009-10-203-4/+26
| | | | | | | | | | | | | | | | | | | | If we reparent a naive menu bar inside a widget that has a menu bar from before, the old menu bar is lost. This patch makes sure that we don't set the new menu bar in this case, but let it remain as-is in case the widget is reparanted out again later. Rev-By: MortenS
| * Fixed QFileDialog crash on SymbianMiikka Heikkinen2009-10-201-0/+10
| | | | | | | | | | | | | | | | softKeyActions QHash in QDialogButtonBoxPrivate was not kept properly in sync with standardButtonHash, causing QFileDialog to crash upon startup. Reviewed-by: Sami Merila
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Alexis Menard2009-10-204-6/+8
|\ \ | |/
| * Softkeys remain disabled if action owning action widget is enabledSami Merilä2009-10-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Softkeys have a QAction that is related to some action widget. The initial state of the action was set according the state of action widget (enabled/disabled). Now, if action widget's state changes, the softkey's action remain in the initial state. This was fixed by removing the enable/disable from the QAction and instead use the real state of action widget when handling the command of softkey. Task-number: QTBUG-4619 Reviewed-by: Janne Anttila
| * Merge commit 'origin/4.5' into origin/4.6Olivier Goffart2009-10-151-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/network/access/qhttpnetworkconnection.cpp src/opengl/qgl_qws.cpp src/opengl/qglpixelbuffer_egl.cpp
| | * Some sub menus are disabled in CocoaPrasanth Ullattil2009-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The commit faec535829a0e454a6784b0c5c37cb63e7da8f73 introduced this bug. Since we can add a submenu to the same supermenu, we should consider it before disabling the submenu who already have a supermenu. Reviewed-by: MortenS
| * | Signal for an update when the cursor is visibleAlan Alpert2009-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | The bug against QFxTextInput is actually due to a bug in QLineControl. Task-number: QT-2319 Reviewed-by: Martin Jones
| * | Removed assertion from QComboBox::removeItem()Stian Sandvik Thomassen2009-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | Made QComboBox::removeItem() do nothing instead of asserting if index is out of range. Reviewed-by: Andy Shaw
* | | QToolButton popup menu is shown at wrong position when embedded in aAlexis Menard2009-10-203-7/+31
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsView. The main problem here is that QWidget assume that they are in the screen somewhere, which means inside the available geometry provided by QDesktopWidget. But in QGraphicsView the button can be in a position that is way bigger than the screen resolution. Lot of widgets make this assumption when positionning subpopups or submenus. Instead of applying the same code on tons of QWidgets, it's better to have an helper function in desktop widget which catch this case. It's not pretty (since it has nothing to do with QDesktopWidget) but we don't have better solution. Task-number:QTBUG-3822 Reviewed-by:brad
* | Second attempt: Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-3/+3
| | | | | | | | | | | | | | The previous commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5 included some changes which were not meant to be pushed. Reviewed-by: TrustMe
* | Revert "Fixed a few compiler warnings from QtGui for Symbian."Janne Anttila2009-10-131-3/+3
| | | | | | | | | | | | Accidentally used git commit -a when should have used only git commit :( This reverts commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5.
* | Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-3/+3
| | | | | | | | Reviewed-by: TrustMe
* | A new implementation of the Gesture API.Denis Dzyubenko2009-10-096-85/+42
| | | | | | | | | | | | | | Implemented gestures using gesture events and separate QGesture/QGestureRecognizer classes. Reviewed-by: trustme
* | Carbon: better wheel acceleration patchRichard Moe Gustavsen2009-10-081-2/+1
| | | | | | | | | | | | | | | | | | It turns out that scrolling appears to be slow when using non-mac mice with the carbon build. This patch introduces a an acceleration algorithm that closer resembles the one used by Cocoa. Rev-By: prasanth
* | DialogButtonBox is shown together with softkeys (QTBUG-4739)Sami Merilä2009-10-081-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes issue that both DialogButtonBox and softkeys are visible (e.g. in Ftp example) at the same time. Reason is that the previous implementation did the visiblitity setting when buttons were created. Unfortunately buttons can be created without parent and let layout manager to find parent them for you - so dialog as parent (=hide dialogbuttonbox as softkeys are in use) check failed. Now similar check is done before showing the widget - it is layoutted here, so it has parent as well. As a bonus, the event handling is already looking for dialog parent, so we can avoid doing another for-loop. Task-number: QTBUG-4739
* | Fix: Lazy instantiation of a static QActionAlessandro Portale2009-10-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not create a QAction instance at program startup, that is before QApplication was initialized. One reason not to do that is that internal fonts are prematurely initialized without QApplication::qt_is_gui_used set to true, which leads to wrong font Dpis in qt_defaultDpiX(). This issue was detected due to the failure in tst_QTextLayout, cases: testDefaultTabs, testTabs, testMultilineTab, testRightTab, testTabsInAlignedParag, testCenteredTab, testDelimiterTab, testMultiTab and tabsForRtl. Fix: create a Q_GLOBAL_STATIC_WITH_ARGS for that QAction instance. Reviewed-by: Liang QI
* | Support small screen for QToolBar auto test.Liang QI2009-10-071-1/+1
| | | | | | | | | | | | We need to test through extension tool button and menu for it when there is no enough width on embedded devices. Reviewed-by: TrustMe
* | Fix crash in QPlainTextEdit when using large fontsEskil Abrahamsen Blomfeldt2009-10-061-0/+3
| | | | | | | | | | | | | | | | | | | | When using very large fonts, sometimes the scrollbar of the QPlainTextEdit will allow you to do scroll down past the end of the document, in which case the currentBlock in hitTest() is inValid() which caused an assert in currentBlock.next(). Task-number: QT-938 Reviewed-by: mae
* | Fix QTextEdit pageUp/Down key handling in read-only modemae2009-10-051-21/+28
| | | | | | | | | | | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QTextEdit. Reviewed-by: con
* | Fix QPlainTextEdit pageUp/Down key handling in read-only modemae2009-10-051-22/+29
| | | | | | | | | | | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QPlainTextEdit. Reviewed-by: con
* | Fix a compilation warning on Mac OS XBenjamin Poulain2009-10-051-1/+4
| | | | | | | | The variable updatesEnabled is not used on Mac OS X.
* | Fixed a crash in menus on Symbian.axis2009-10-052-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for the crash was the following: When we make menu entries in Qt, we assign each item an arbitrary command ID. This is because Symbian usually puts the items in a resource file and refers to them by ID, but we need to be dynamic. These command IDs are also assigned to cascading menu items (sub menus). When we then get a callback in RestoreMenuL with one of submenu IDs, we used to ask Symbian to construct the menu items for them, but Symbian doesn't know about them. Fixed by avoiding call into S60 code if the ID belongs to Qt. Also put a cap on the number of menu items. It's very unlikely that anyone will reach it, but it's better to have an actual check. Task: QT-646 AutoTest: Manual testing went fine RevBy: mread
* | Added some comments.axis2009-10-051-1/+1
| |
* | Fixed indentation.axis2009-10-051-3/+3
| |
* | Moved non-public functions out of public header file.axis2009-10-052-8/+5
| | | | | | | | RevBy: Trust me
* | Disable etched text on rich text labelsJens Bache-Wiig2009-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When rendering etched text on disabled rich text labels we would previously draw distorted links. This is basically because anything that did not render with the text foreground role would be drawn twice as a shadow. Since there is no way to properly render this text etched we will rather disable it completely when the label uses rich text. Task-number: QTBUG-4543 Reviewed-by: Simon Hausmann
* | Mac: bugfix 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-021-9/+16
| | | | | | | | | | | | Seems like I forgot to handle page scrolls. Also did a small optimization (see also 45f095b8970dc3c1b6f6e97fa2323654ba848288)
* | Mac: update/small fix to 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-022-12/+14
| | | | | | | | | | | | | | | | It turns out that we need to let singleStep keep its value in qtextedit so that pushing the up/down buttons on the slider works as they should. Moreover, overriding the behaviour in abstract slider also makes QGraphicsView work out of the box. Also added in the test fix suggested by Olivier.
* | Clear text selection in QLabel when it is losing focusmae2009-10-021-1/+12
| | | | | | | | | | | | | | The change implements the same logic for QLabel which QLineEdit (and implicitely QSpinBox and QComboBox) already had. Reviewed-by: Simon Hausmann
* | Fix: Abstract slider does not understand wheel events properlyRichard Moe Gustavsen2009-10-013-23/+22
| | | | | | | | | | | | | | | | | | | | | | A wheel event contain delta values that describe the rotation angle the wheel was rotated (in 1/8 of a degree). For some mouse devices (thinking of mac mighty mouse/trackpad) the resolution is better than the standard 15 degrees. The Qt docs describe how to deal with this. But abstract scrollbar does did follow this recipe, but it does now with this patch. Reb-By: prasanth
* | Fix regression in Command link button font sizeJens Bache-Wiig2009-09-091-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Since vista style polish sets the font on polish, the check for WA_SetFont will succeed, hence we never set the actual font. I replaced the check with a full resolve. However since the resolve would clear the resolve_mask, from the widget font it has to be restored manually so that QPainter:setFont can resolve it later. Task-number: QTBUG-4646 Reviewed-by: trond
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Jani Hautakangas2009-09-301-2/+2
|\ \
| * | Fix typo.Alexis Menard2009-09-291-2/+2
| | | | | | | | | | | | Reviewed-by: TrustMe
* | | Symbian specific fixes to QComboBoxJani Hautakangas2009-09-301-7/+3
|/ / | | | | | | | | | | | | | | Fixes QComboBox edit field geometry in s60style Fixes softkey crash when setting a custom itemview to QComboBox Fixes Symbian keyboard input interval in tst_QComboBox::virtualAutocompletion() Reviewed-by: Sami Merila