summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_s60.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-04-211-11/+0
|\ | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_ost/qostdevice.h
| * Build break fix for simulated QS60StyleSami Merila2011-04-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes in QS60Style (to support placeholder background texture) causes the simulated style not to build. The implementation for new method placeHolderTexture() is on the Symbian-specific sourcefile, which is omitted in the simulator builds. As a fix, move the implementation to the "generic" style source file qs60style.cpp, since the method does not contain any Symbian specific code. Task-number: QTBUG-18863 Reviewed-by: owolff
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-181-11/+22
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/global/qnamespace.h src/gui/text/qtextcontrol.cpp
| * Make QS60Style to support new Tab graphics in new Symbian releasesSami Merila2011-04-081-11/+22
| | | | | | | | | | | | | | | | | | | | | | In SR.11 there is a new theme graphics (with separate ID) for TabWidget tab shapes. Also, shapes are no longer set overlapped, but are side-by-side without any gaps. Earlier releases still use the existing graphics with overlapping. Task-number: QT-4762 Reviewed-by: Miikka Heikkinen
* | Remove workaround and fix properlySami Merila2011-04-071-10/+2
|/ | | | | | | | The workaround for 3.1 can now completely removed, since support for 3.x was dropped. Task-number: QTBUG-4565 Reviewed-by: Miikka Heikkinen
* QTabWidget tabs are resized in wrong way when device rotatesSami Merila2011-03-251-18/+0
| | | | | | | | | | | | | | | | This used to work so that, style would check from actual AVKON component (navipane) what its size is. Unfortunately, Qt was later changed so that screen furniture is only created on-demand and thus asking navipane's size started to fail. Which lead to situation that tab size would "grow" after navipane was created and tabbar was re-drawn. As a fix, correct the pixel metrics with correct values for nHD and remove size query from native component. The other pixel metrics for other layouts were correct. Task-number: QTBUG-16984 Reviewed-by: Tomi Vihria
* Add missing nullify for the s60 style's background pixmap pointer.Laszlo Agocs2011-03-231-0/+1
| | | | | | | Qt apps would crash during orientation change without setting m_background to null after deleting it. Reviewed-by: Sami Merila
* QS60Style: Update placeholder texture to real oneSami Merila2011-03-221-4/+19
| | | | | | | | | | | | | | Once the background texture has been created, update it to all widgets. This corrects most cases where texture is used outside of QS60Style. It is still possible to access the placeholder texture and draw it, if: a) QPalette::Window is accessed before drawing even one widget b) Painting the texture happens without using QS60Style Task-number: QTBUG-14910 Reviewed-by: Laszlo Agocs
* Changed s60 style not to rely on QPixmapData::toNativeType().Laszlo Agocs2011-03-211-5/+6
| | | | | | | | | Forcing VG (and GL) pixmapdata to support toNativeType() with type VolatileImage is unnecessary. It is cleaner to try doing a fromNativeType() with bitmap+mask and fall back if that results in a null pixmapdata. Reviewed-by: Jani Hautakangas
* QS60Style: use placeholder texture when polishing widgets and paletteSami Merila2011-03-151-2/+12
| | | | | | | | | | | | | | | | | Background texture is not created until it is actually painted. This allows skipping the whole background texture creation, if app overwrites the QPalette::Window with its own data (image or color). When widget is drawn and style notices that the widget is still using a placeholder (1*1 red QPixmap) texture, it creates the real texture and uses that for drawing. Note that accessing QPalette::Window will give the placeholder pixmap. Which is then again replaced with the real texture, if it is drawn through the qt_s60_fill_background(). Task-number: QTBUG-14910 Reviewed-by: Laszlo Agocs
* Regression: QS60Style: Theme background is incorrectSami Merila2011-03-151-0/+1
| | | | | | | | | | | | | | | | | Fix for QTBUG-16816 cause theme background to display incorrectly after a layout switch is done. Theme background is shown "tiled" instead of being whole screen size. This is because the setBackgroundTexture() call was removed to "save" QPixmap creation. Unfortunately, it really skips the background texture creation, but does not re-create a new one for the new layout, so portrait background is used again. This leads to tiling the image. Let's just return the call to the setBackgroundTexture() (this will eventually anyway be "optimized" with fix for QTBUG-14910). Task-number: QTBUG-17930 Reviewed-by: Laszlo Agocs
* QS60Style slows down layout switch by updating widgets unnecessarilySami Merila2011-03-141-1/+0
| | | | | | | | | | Remove refreshUi() method frmo QS60Style. It might have been necessary two years ago, when we didn't have proper polishing of QWidgets (when style changed), but it is no longer needed. It just slows down orientation switch. Task-number: QTBUG-17840 Reviewed-by: Tomi Vihria
* Changed QPixmap VG backend to use CFbsBitmap on Symbian.Laszlo Agocs2011-02-281-5/+21
| | | | | | | | | | | | | | Similarly to QS60PixmapData, that is used on raster, QVGPixmapData is also backed by a CFbsBitmap from now on (at least when it makes sense to do so). This allows copy-less bitmap handle duplication in from- and toSymbianCFbsBitmap() in case of certain image formats, reduces local heap usage and improves performance with the s60 style due to a reduced number of pixel data copies. Task-number: QT-2505 Reviewed-by: Jason Barron Reviewed-by: Jani Hautakangas
* Application background is incorrect if app locked to landscape.Sami Merila2011-01-261-4/+4
| | | | | | | | | | | | | | | If application orientation has been locked to landscape and application is started out while device orientation is portrait, QS60Style draws the QPalette::background like device would be in landscape. Style is incorrectly following device orientation, when it should follow application orientation. As a fix, style follows now application orientation. As a bonus, unnecessary fullscreen QPixmap creation is avoided when rotating the device. Task-number: QTBUG-16816 Reviewed-by: Jani Hautakangas
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Remove support for automatic tactile feedback from QS60StyleSami Merila2010-12-161-23/+1
| | | | | | | | | | | | | | | Currently QS60Style loads automatically a plugin to support tactile feedback for styled applications. However, there is no control over this, so applications cannot remove the automatic support, if they'd like to use Mobility APIs to control the feedback themselves. In order to avoid this, remove tactile feedback plugin from style. Lets see if we can later put this back with optional enable/disable flag. Task-number: QTBUG-16151 Reviewed-by: Miikka Heikkinen
* Removed some new warnigs.Alessandro Portale2010-11-291-3/+2
|
* QS60Style: Color calculation should be optimizedSami Merila2010-11-091-4/+4
| | | | | | | 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-091-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Support tactile feeedback from QS60Style for QWidgetsSami Merila2010-10-291-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Plug memory leak from QS60StyleSami Merila2010-09-031-0/+6
| | | | | | | | | 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
* Fixed additional case differences between Gnupoc and Symbian^3.axis2010-07-301-3/+3
| | | | RevBy: Trust me
* Change the files to camelcase as avkon now does thatThomas Zander2010-06-251-7/+7
| | | | | | | In older avkon solutions all headers were lowercase in newer they are CamelCase... Reviewed-by: Axis
* Stylus menu for Share (QT app) is different from native S60 appsSami Merila2010-06-111-2/+8
| | | | | | | | | | | | | First part of corrections to make menu items more native like. This fixes: - In Sym^3 "separator items" are drawn automatically between items, using a simple line graphic with theme color and alpha values - highlight for menu item is positioned better - menu items themselves are better positioned - the corners of highlight are now more rounded for Sym^3 devices Task-number: QT-3295 Reviewed-by: Alessandro Portale
* Incorrectly named keys in QS60StyleEnums::SkinPartsSami Merila2010-06-111-30/+30
| | | | | | | | | | | Some of the internal part names of QS60Style do not match the real theme item names, making automated tool use to make "theme blob" for QCreator simulator manual work. Renamed the parts to match native side names. Task-number: QTBUG-11053 Reviewed-by: Alessandro Portale
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-2/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * QS60Style: QTreeView branch indicators are drawn incorrectly in RtoLSami Merila2010-05-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | QS60Style tries to rotate branch graphics around the x-axis, when it is running in RtoL UI direction. This makes the "L-shaped" branch indicators to point to too high at the item view item. Branch indicators should be mirrored across the x-axis to make them look fine. Task-number: QTBUG-9844 Reviewed-by: Alessandro Portale
| * QS60Style: Housekeeping taskSami Merila2010-05-071-2/+3
| | | | | | | | | | | | | | Fix whitespace, remove unneeded code, break very long lines to two rows. Reviewed-by: Alessandro Portale
* | Use lowercase includes so it compiles in Linux tooThomas Zander2010-05-031-7/+7
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-211-2/+6
|\ \ | |/ | | | | | | | | | | Conflicts: src/openvg/qpaintengine_vg.cpp src/script/bridge/qscriptqobject_p.h tests/auto/bic/tst_bic.cpp
| * Context menu for application is differs from native S60 appsSami Merila2010-04-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | QMenu and QComboBoxListView differ somewhat from their native equivalents. First, the font is not correct. It uses a default font, when style should polish the widgets to use "AVKON primary" font. Second, the background graphic is not the same as on native side. Finally, and most importantly, menu items should be lot taller when using touch enabled S60 UI. Task-number: QT-3295 Reviewed-by: Janne Anttila
| * QS60Style: Qt does not draw transparency correctlySami Merila2010-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is due to default mask depth in QS60Style. It is currently set as default EGray2 and then inquiried from S60SkinServer. For 3.1 devices, skinserver does not explicitly set the mask depth (even though default is 8bit mask), so no value is returned and default value is used. This leads to a situation where style uses 2bit masks for 9 or 3 part frame graphics. Corrected by changing the default value to 8bit mask (EGray256). Task-number: QTBUG-9927 Reviewed-by: Janne Anttila
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-141-0/+21
|\ \ | |/ | | | | | | Conflicts: src/script/api/qscriptengine.cpp
| * QS60Style: Single Click UI support for SD 9.2 time-boxSami Merila2010-04-131-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | Final commit for this task. For widgets that use the highlighted list/table graphic, style now supports pressed state for the highlight. Style filters mouse press and release events and sets the highlight graphics to be correct based on mouse events (i.e. touch) it gets. Task-number: QT-2298 Reviewed-by: Alessandro Portale
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-291-13/+15
|\ \ | |/ | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro
| * QS60Style cannot draw transparency to UI element border areasSami Merila2010-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | Due to incorrect initialization of CFbsBitmap, graphic frames (9-part, or 3-part ones) are drawn with white non-transparent rect below them. Initialization corrected. Task-number: QT-3185 Reviewed-by: Janne Anttila
| * QMessageBox is smaller than native MessageBoxSami Merila2010-03-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Messageboxes are smaller than native ones. This is due to that native ones have a lot of empty space. To fix this, we define a new custom pixel metrics that is the minimum height of one text line messagebox (aka AknPopUp) on the native side. Then we ensure that the QMessageBox is at least of this height. Additionally we do some minor styling for QMessageBox: - the corners graphics are now as rounded as on native side - the font is set to match the native side - the top margin space is doubled for dialogs, which is rather good approximation of native side Task-number: QTBUG-4875 Reviewed-by: Janne Anttila
| * Compile fixAlessandro Portale2010-03-231-2/+2
| | | | | | | | | | | | | | Commit 47902b7587d66c0941bacf08b31b8caae264f09a was missing one enum rename in qs60style_s60.cpp Reviewed-by: TrustMe
| * QS60Style: HousekeepingSami Merila2010-03-221-2/+2
| | | | | | | | | | | | | | Remove unnecessary #include, remove unnecessary integer, correct spelling issues in comments and replace tabs with spaces. Reviewed-by: Alessandro Portale
| * Adding custom pixel metrics requires cleaning and rebuilding of QtGuiSami Merila2010-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is due that the size of the pixel metrics table is stored in some object file and the file is not updated, even if we increase the table size integer. Removing direct calls from internal methods to member variable data[] removes the need to do whole rebuild when adding values. Relates to task #9247. Task-number: QTBUG-9247 Reviewed-by: Alessandro Portale
* | Merge branch 'linux-symbian-sbsv2-support' into 4.7-s60axis2010-03-231-1/+1
|\ \
| * | Corrected wrong header casing.axis2010-03-151-1/+1
| | |
* | | Merge branch '4.6-s60' into 4.7-s60axis2010-03-221-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/gui/kernel/qapplication.cpp src/gui/text/qtextlayout.cpp src/openvg/qpixmapdata_vg.cpp src/s60installs/s60installs.pro tools/runonphone/main.cpp tools/runonphone/serenum_unix.cpp qtextlayout.cpp fixed up together with Eskil. Kept the configure.exe from 4.7 without recompile.
| * | QS60Style assert fails to detect an index failureSami Merila2010-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QS60Style asserts that a given index is correct when setting theme colors. Unfortunately it uses less-and-equal-to operator ('<='), which is incorrect. It should use less-than ('<')operator, otherwise the assert fails when index is equal to number of items in the color table. Task-number: QT-3078 Reviewed-by: Alessandro Portale
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-151-7/+7
|\ \ \ | |/ / | | / | |/ |/| Conflicts: src/gui/styles/qs60style_s60.cpp
| * Fixed filename cases to support building Qt for Symbian in LinuxMiikka Heikkinen2010-03-121-7/+7
| | | | | | | | | | | | | | Part of QtP delta reduction effort. Task-number: QT-3055 Reviewed-by: Janne Koskinen
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-161-0/+2
|\ \ | |/ | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp tests/auto/qlineedit/tst_qlineedit.cpp tests/benchmarks/benchmarks.pro
| * Build break fix for QS60Style.Sami Merila2010-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | Very recent change for QS60Style breaks compilation of the style for 3.1. This is due to that style refers to a skin item ID that is not existing on 3.1 environment. Fixed by referring to the skin ID with its internal values. Task-number: QTBUG-8193 Reviewed-by: TrustMe
| * QS60Style draws drop area as a black rectSami Merila2010-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | When Drag-n-Dropping elements in itemviews QS60Style draws drop area as a black rect. Change this so that native graphics are used instead. This change only affects touch-devices as non-touch 3.x devices do not have the native graphics defined. In 3.x non-touch devices, style still uses QCommonStyle to draw the DropArea. Task-number: QTBUG-8193 Reviewed-by: Alessandro Portale