summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
Commit message (Collapse)AuthorAgeFilesLines
* Removed some new warnigs.Alessandro Portale2010-11-291-3/+2
|
* Fix warnings related to unused variables.Thiago Macieira2010-11-262-0/+6
| | | | | | | Just add some Q_UNUSED for parameters or remove the variable we don't need for the others. Reviewed-by: Trust Me
* QS60Style: Null pointer crash when using itemviews in some cases (pt2)Sami Merila2010-11-191-2/+2
| | | | | | | Also remove accidentally added whitespaces. Task-number: QTBUG-15455 Reviewed-by: TrustMe
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team into 4.7Sami Merila2010-11-191-0/+50
|\
| * QToolbar should fill available width on SymbianSami Merila2010-11-181-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally QStyle provides a minimum size for a widget. However, to imitate native toolbar behavior, QToolBar should occupy available screen estate on Symbian (with QS60Style). This is only supported for horizontal QToolBars as native side does not have same functionality for vertical toolbars. QToolbar size now tries to take into account available size of parent reduced by margins (if several parents, then each can reduce the available space by their margins). Also, toolbar internal pixel metrics data (item spacing, item margins) are taken into account. Task-number: QTBUG-13120 Reviewed-by: Janne Koskinen
* | QS60Style: Null pointer crash when using itemviews in some casesSami Merila2010-11-191-4/+5
|/ | | | | | | | | QS60Style attempts to use null pointer when drawing CE_ItemViewItem, if the parameter widget is provided as null. This leads to, for example, Chart example app crash in startup. Reviewed-by: Janne Anttila
* Doc: Fixing typoSergio Ahumada2010-11-111-1/+1
|
* QS60Style: Color calculation should be optimizedSami Merila2010-11-092-5/+5
| | | | | | | Addendum to the previous fix. Remove trailing white space as well. Task-number: QTBUG-14860 Reviewed-by: Jani Hautakangas
* QS60Style: Color calculation should be optimizedSami Merila2010-11-093-59/+130
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, QS60Style calculates some palette colors (tooltip base and button). Since native side does not have a color for these, but a nine-part theme graphic, the style tries to estimate the color of the bitmap by taking a small sample of the QPixmap and calculate the RGB colors of 32*32 pixels. This is rather slow, it takes around 110 msecs for each QApplication, when the application is started. Note that color is cached to member variable of style, but it is very rarely asked again (as the color is polished to all widgets/apps) and the cache is not shared across processes. As a fix, style now calculates the button color (tooltip color is no longer calculated, as no other QStyle does that, and tooltips do not anyway work in the Qt/Symbian) and stores the calculated value to Global QSettings together with active theme ID. Now, when a second Qt application is launched, the stored theme ID value is matched with currently active theme. If it matches, then the stored Button color is used. Otherwise, color is again calculated and stored. If theme is unchanged, the application launch is ~95msecs faster. Task-number: QTBUG-14860 Reviewed-by: Jani Hautakangas
* Remove code changes that were NOT intended as part of the fixSami Merila2010-11-042-19/+0
| | | | | | | | | For some unknown reasons (read: missed git checkout -f), few code line changes which were NOT part of fix for QTBUG-14331 crept into the commit. These are now removed with this fix. Task-number: QTBUG-14331 Reviewed-by: Janne Anttila
* Qt/Symbian: QInputDialog layout and size are wrongSami Merila2010-11-032-2/+21
| | | | | | | | | | | | | | | | The QInputDialog with anything but QLineEdit as the input widget, will show up as minimal size on device/emulator. Also, the dialog looks bad since the widgets are deployed very close to the dialog borders. As a fix, layout will not get the size policy set on Symbian, but the dialog itself is stretched to occupy screen width and thus, layout grows to occupy the available size. Additionally, style will set layout pixel metrics for dialogs larger than for other widgets, to avoid the layout from putting widgets very close to dialog border. Task-number: QTBUG-14331 Reviewed-by: Janne Anttila
* Fix poor English in QStyle::polish documentation.Jason McDonald2010-11-011-4/+4
| | | | | Task-number: QTBUG-10538 Reviewed-by: Trust Me
* Support tactile feeedback from QS60Style for QWidgetsSami Merila2010-10-294-2/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently tactile feedback is not given for QWidgets running on Symbian even if the native side supports this (Sym^3 and 5th Edition devices). This task adds support for QWidgets having QS60Style. The tactile feedback has been implemented as a plugin that the style loads when instantiating itself for touch devices. NOTE that the feedback is NOT supported by the emulated style, nor is the plugin interface public, so it cannot be used outside of style. The implementation is simplistic, since we only want to provide stop-gap solution until 4.8 when real Qt feedback implementation is ready. The implementation will only give feedback for touch-down events for visible, interactive and enabled widgets. Sliders and scrollbars will use sensitive feedback (slightly less aggressive) and all others will use basic feedback. Note that Sym^3 adds tens of different feedback categories, which this plugin ignores as we want to share the same implementation for Sym^3 and 5th ed. In distributed Qt package there is no tactile feedback for 5th edition, due to package creation limitations. Support can be added manually by re-compiling Qt on top of 5th Edition SDK. Task-number: QT-4037 Reviewed-by: Jani Hautakangas Reviewed-by: Janne Koskinen
* Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
|
* QS60Style: The QComboBox/QSpinBox text color is not according to themeSami Merila2010-10-211-4/+1
| | | | | | | | | Theme text colors are incorrect for spinboxes and comboboxes, they should have same theme colors as lineedit has, as they are using same graphic for "editor" sub-control in them. Task-number: QT-4176 Reviewed-by: Miikka Heikkinen
* QS60Style: ComboBox disappears after orientation switchSami Merila2010-10-181-0/+2
| | | | | | | | | | | | | This is due to that QS60Style uses desktop area for a bounding rect of combobox content to disallow it to grow outside of screen size. Unfortunately with some recent changes to screensize handling in desktop widget size makes the desktop resize to happen later than when style is asked for combobox size. So, style returns invalid QSize for combobox content size. As a fix, if the returned size is invalid, ask it directly from QCommonStyle. Task-number: QTBUG-14423 Reviewed-by: Janne Anttila
* Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7Morten Engvoldsen2010-10-071-8/+3
|\
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-10-072-11/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (36 commits) Fix failure on Windows after commit ccd3f66 tst_qtcpserver: Another attempt to reproduce QTBUG-14268 Fix crash when constructing QThreadStorage after global destructors have run tst_qtcpsocket: Attempt to reproduce QTBUG-14268 Fixed a buffer overrun when pasting large data from non-Qt apps Fix copying large data to non-Qt applications fix regexp in "make custom command handling in vc(x)proj files sane" qmake: Include -pthread when reducing duplicate library arguments qmake: Ensure right library order when reducing duplicate libraries rebuild configure.exe make QMAKE_POST_LINK handling in nmake generator sane make custom command handling in vc(x)proj files sane Revert "QWorkspace: fix hardcoded min size overwriting the real min size" QtScript/JavaScriptCore: Backport random number generator seeding fix Fix performance regression in QUuid::createUuid() Update japanese translations. Ensure that the underline is only drawn when expected for an accel Small improvement in the textedit demo My changes for 4.7.1 QWorkspace: fix hardcoded min size overwriting the real min size ...
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-10-062-11/+28
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (32 commits) Fixed a buffer overrun when pasting large data from non-Qt apps Fix copying large data to non-Qt applications fix regexp in "make custom command handling in vc(x)proj files sane" qmake: Include -pthread when reducing duplicate library arguments qmake: Ensure right library order when reducing duplicate libraries rebuild configure.exe make QMAKE_POST_LINK handling in nmake generator sane make custom command handling in vc(x)proj files sane Revert "QWorkspace: fix hardcoded min size overwriting the real min size" QtScript/JavaScriptCore: Backport random number generator seeding fix Fix performance regression in QUuid::createUuid() Update japanese translations. Ensure that the underline is only drawn when expected for an accel Small improvement in the textedit demo My changes for 4.7.1 QWorkspace: fix hardcoded min size overwriting the real min size Doc: Fixing link titles and error color in search results Doc: Implementing features to the search feature. Setting the _NET_WM_STATE Atom only when its not already set Fix focus appearance of tabwidget tabs with QGtkStyle ...
| * | | QS60Style: Highlighted TreeBranch indicator is incorrectSami Merila2010-10-061-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the fix for QTBUG-13553 incorrectly uses commonstyle to draw branch highlight, when it should use QS60Style. As a fix, commonstyle should not be used unless theme palette has been tempered with. Task-number: QTBUG-13699 Reviewed-by: Miikka Heikkinen
| * | QS60Style: QDateEdit - Layout issuesSami Merila2010-10-051-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In portrait orientation, QDateEdit's calendar popup (QCalendarWidget) does not fit into screen. As a fix, the pixel metric PM_FocusFrameHMargin, is reduced from 13 to 3 in qHD screens (640*360). Also, the explicit halving of the pixel metric for QTableViews is removed. The pixel metric resulted in 27 pixel text margins (2 * pm + 1)for calendar widgets, which is clearly a bit too much. Task-number: QTBUG-14126 Reviewed-by: Miikka Heikkinen
* | | Merge commit 'doc-team/4.7' into 4.7Morten Engvoldsen2010-10-061-5/+5
|\ \ \ | |_|/ |/| |
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7David Boddie2010-10-044-10/+19
| |\ \ | | |/
| * | Doc: Fixed the in-repository licenses for the documentation.David Boddie2010-10-041-5/+5
| | | | | | | | | | | | | | | | | | In the repository, we should always use the No Commercial license alongside the GNU Free Documentation License for documentation files.
* | | Ensure that the underline is only drawn when expected for an accelAndy Shaw2010-10-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac, the underline for an accel should not be drawn at all as this is not part of the style guidelines. This ensures that it is not drawn. Autotest included which required a change to drawItemText() to go via the proxy as well so that the autotest would be useful too. Task-number: QTBUG-14172 Reviewed-by: Richard
* | | Fix focus appearance of tabwidget tabs with QGtkStyleJens Bache-Wiig2010-10-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was an issue with ubuntu Ambience theme since it requires a custom tab style. This was not currently supported by QGtkStyle. Task-number: QTBUG-14161 Reviewed-by: thorbjorn
* | | Incorrect selection background for unfocused widgets with GTKJens Bache-Wiig2010-10-011-3/+15
| |/ |/| | | | | | | | | | | | | | | | | | | In Ubuntu 10.10 the unfocused selection background is different from the focused one. Interestingly they use GTK_STATE_ACTIVE for unfocused widgets. This was verified back to GTK 2.10 which is the required minimum for QGtkStyle so it should be safe for all other styles as well. Task-number: QTBUG-13792 Reviewed-by: thorbjorn
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-09-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Added support for unsigned smart installer package creation in Symbian Fix QApplication::desktop()->availableGeometry() for Symbian QS60Style: Possible NULL pointer use when drawing frame
| * | QS60Style: Possible NULL pointer use when drawing frameSami Merila2010-09-301-1/+1
| |/ | | | | | | | | | | | | | | | | QS60Style::drawControl casts QStyleOption pointer to QStyleOptionFrame, yet never checks if the orginal pointer was NULL or not. The casted pointer is then used to fetch palette information from style option. Thus, this might lead to crash. Reviewed-by: Miikka Heikkinen
* | GtkStyle: memory leaks in widget map are fixedDenis Mingulov2010-09-282-8/+17
| | | | | | | | | | | | | | Task-number: QTBUG-13636 Merge-request: 817 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
* | Fixed a painting glitch with checked menu icons on WindowsXPJens Bache-Wiig2010-09-281-1/+1
|/ | | | | | | | | | This issue affected windows XP style. The checked icon would get incorrect border offsets before. The fix was suggested by Jonathan Liu. Reviewed-by:richard Task-number: QTBUG-10796
* Fix warning on MSVCOlivier Goffart2010-09-221-1/+1
| | | | Reviewed-by: Thierry
* Button remains pressed if release event happens outside of widgetSami Merila2010-09-211-2/+1
| | | | | | | | | | | | | QS60Style tracks the pressed down state for itemviews and some other widgets that required highlight pressed down graphics. However, the implementation was faulty as it required that a mouse release event occurs in another widget, instead of anywhere. This partially fixes QTBUG-13759. Task-number: QTBUG-13759 Reviewed-by: Jani Hautakangas
* QS60Style does not show checkbox for checkable item in QTreeViewSami Merila2010-09-171-2/+2
| | | | | | | | | | QS60Style currently skips drawing of checkbox for checkable itemviews. It however reserves space for the checkbox in the itemview item row. As a fix, also draw the checkbox. Task-number: QTBUG-11150 Reviewed-by: Shane Kearns
* Panic in qs60style.cpp while drawing a QTreeViewSami Merila2010-09-172-11/+27
| | | | | | | | | | | | | | | QS60Style crashes when running a test application that modifies active style AND application's palette. After switching to other style, setting palette to application default, re-enabling the style's palette and activating QS60Style, causes a crash. This is due to that internal theme palette is tried to access, before it is constructed. Fixed by making sure that when theme palette is accessed, it is not NULL. Task-number: QTBUG-13553 Reviewed-by: Miikka Heikkinen
* QS60style: itemview selection indication works incorrectlySami Merila2010-09-161-17/+23
| | | | | | | | | | | | | | Currently QS60Style shows tick mark for listWidget with multiselection capability only after two or more items are selected. This is fixed so that selection indication is shown in multiselection itemviews (all of them and not just list widget) irregardless of number of selected items. Also, if itemview loses focus with singleitem itemview, style now still draws item highlight to it (with 50% transparency). Task-number: QTBUG-12875, QTBUG-13072 Reviewed-by: Janne Anttila
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-09-073-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.win32 src/corelib/io/qfsfileengine_win.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/gui/dialogs/qfiledialog_win.cpp src/gui/inputmethod/qcoefepinputcontext_s60.cpp src/gui/text/qfontdatabase_win.cpp src/gui/util/qsystemtrayicon_win.cpp src/script/utils/qscriptdate.cpp tests/auto/qinputcontext/tst_qinputcontext.cpp tests/auto/qscriptengine/tst_qscriptengine.cpp
| * Ensure that we load system libraries from the correct location.Jan-Arve Sæther2010-09-033-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a security hole that has been there for a while, but the public awareness have recently rised so the threat is more imminent now. The solution is to fix all places where we dynamically load system libraries. More specifically, we now load all system libraries with an absolute path that points to a library in the system directory (usually c:\windows\system32). We therefore introduce a small class named QSystemLibrary that only loads libraries located in the system path. This shares some of the API with QLibrary (in order to make the patch as small as possible). We don't fix QLibrary due to risk of regressions. In addition, applications can fix the code that calls QLibrary themselves. The problem does not apply to Windows CE, since the search order is documented as not searching in the current directory. However, it touches some CE-specific code - therefore QSystemLibrary is sometimes used on WinCE (however, it will just do a normal LoadLibrary() since its safe anyway). This change does not affect the testability plugin (it is not clearly documented where that plugin is located, and the plugin should never be used in production code anyway) Loading OpenSSL libraries The ssl libraries are handled specially, and searched in this order (we cannot expect them to always be in the system folder): 1. Application path 2. System libraries path 3. Trying all paths inside the PATH environment variable Task-number: QT-3825 Reviewed-by: Thiago Macieira Reviewed-by: Peter Hartmann
* | QS60Style: QToolbar button and checked state is not shownSami Merila2010-09-031-10/+7
| | | | | | | | | | | | | | | | | | QS60Style ignores Style_On state for QToolButton drawing. This has been fixed, so that when toolbutton is "on", button is drawn with pressed down graphics. Task-number: QTBUG-13099 Reviewed-by: Alessandro Portale
* | Plug memory leak from QS60StyleSami Merila2010-09-033-0/+10
| | | | | | | | | | | | | | | | | | Currently style leaks an animation object (QS60StyleAnimation) when style is destroyed. To avoid this, animation object array is deleted in the style's destructor. Task-number: QTBUG-13145 Reviewed-by: mread
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-09-011-1/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed input context trying to squeeze content into a full widget. Fixed a case where a newly created native widget would lose focus. Cleaned up position tracking in the Symbian input methods. Revert "Long-press shortcuts for symbols on QWERTY keyboard don't work" Added catching of errors in timers. QT_PLUGINS_BASE_DIR needs to be defined after load(qt_config) QS60Style: Itemviews are drawn incorrectly Fixed sporadically failing autotest on Symbian.
| * | QS60Style: Itemviews are drawn incorrectlySami Merila2010-09-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running QS60Style on hardware, all the itemview items without any special background (i.e. not "pressed", not "highlighted", not "alternate") are drawn with "pressed button" graphics. This is due that the internal drawing function gets called without any enum value set and it seem to pick the second enumeration constant from theme element list. The enumeration constant is not defined to match to any integer value. As a solution, style will not call the drawing function when theme element is not defined. Task-number: QTBUG-11601 Reviewed-by: Liang Qi
* | | Fix some missing proxy calles for CleanLooksJens Bache-Wiig2010-09-011-5/+5
|/ / | | | | | | | | | | These were simply left out as an oversight. Task-number: QTBUG-13318
* | Fixed item view background color in Gtk styleJens Bache-Wiig2010-08-251-1/+4
| | | | | | | | | | | | | | | | | | Autotests were modified to check for 50% color coverage as well. Before they were not really testing the bgcolor since they would accept only the red grid color as a valid test pass. Task-number: QTBUG-13125 Reviewed-by: ogoffart
* | Doc: Fixing typoMorten Engvoldsen2010-08-111-1/+1
| |
* | 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
* | doc: Fixed some qdoc errors.Martin Smith2010-08-091-1/+1
| |
* | Mac: fix regression from 65a673f that makes some buttons unclickableRichard Moe Gustavsen2010-08-043-0/+16
| | | | | | | | | | | | | | | | | | 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
* | Fixed additional case differences between Gnupoc and Symbian^3.axis2010-07-301-3/+3
| | | | | | | | RevBy: Trust me
* | QMenu and QStyleSheetStyle: fix setting a border.Olivier Goffart2010-07-281-0/+7
| | | | | | | | | | | | | | | | The native border would be drawn over the one drawn by the QStyleSheetStyle Regression since 68a498284e206e2bb000bc35331c966f3790f607 Reviewed-by: Gabriel Task-number: QTBUG-10785