summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QS60Style: use placeholder texture when polishing widgets and paletteSami Merila2011-03-151-0/+4
| | | | | | | | | | | | | | | | | 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
* QS60Style slows down layout switch by updating widgets unnecessarilySami Merila2011-03-141-2/+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
* 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-4/+0
| | | | | | | | | | | | | | | 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
* QS60Style: Color calculation should be optimizedSami Merila2010-11-091-1/+1
| | | | | | | 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-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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-041-1/+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-031-0/+1
| | | | | | | | | | | | | | | | 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
* Support tactile feeedback from QS60Style for QWidgetsSami Merila2010-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Panic in qs60style.cpp while drawing a QTreeViewSami Merila2010-09-171-0/+2
| | | | | | | | | | | | | | | 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
* Plug memory leak from QS60StyleSami Merila2010-09-031-0/+1
| | | | | | | | | 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
* Incorrectly named keys in QS60StyleEnums::SkinPartsSami Merila2010-06-111-24/+24
| | | | | | | | | | | 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
* QS60Style: QTreeView branch indicators are drawn incorrectly in RtoLSami Merila2010-05-071-0/+2
| | | | | | | | | | | | 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: Single Click UI support for SD 9.2 time-boxSami Merila2010-04-131-1/+26
| | | | | | | | | | | | 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
* QMessageBox is smaller than native MessageBoxSami Merila2010-03-251-3/+3
| | | | | | | | | | | | | | | | | | | 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
* Remove internal custom pixel metric enumsSami Merila2010-03-231-8/+0
| | | | | | | | Use only public custom pixel metrics. Remove the internal enum and switch usage of those to public enum values. Task-number: QTBUG-9247 Reviewed-by: Alessandro Portale
* QS60Style: HousekeepingSami Merila2010-03-221-1/+1
| | | | | | | Remove unnecessary #include, remove unnecessary integer, correct spelling issues in comments and replace tabs with spaces. Reviewed-by: Alessandro Portale
* Custom pixel metric values cannot be inquired from outside the classSami Merila2010-03-221-0/+3
| | | | | | | | | | This is due that a) custom values are internal and not exposed b) values use different format - they are indexes for internal data[] table and not according to QStyle documentation for pixel metrics. Task-number: QTBUG-9247 Reviewed-by: Alessandro Portale
* QWebView scrolling doesn't clear old elements before painting againSami Merila2010-02-181-1/+2
| | | | | | | | | | | | | | | | | Author: Petri <petri.ojala@digia.com> Date: Wed Feb 10 12:27:19 2010 +0200 Patch to QTBUG-7286 QWebView scrolling doesn't clear old elements before painting on top of them. The bug exists only if web page does not set its backgroung color. Solution is to set White color as a default color for web page backgrounds. White color was causing some visibility problem (at least with lineedit) and it was solved by editing ::canDrawThemeBackground Task-number: QTBUG-7286 Reviewed-by: Sami Merila
* Compilation error fix: missing comma in enum list in QS60StyleSami Merila2010-02-151-1/+1
| | | | | | | | | Fix for QTBUG-8193 introduced a new enum value into s60style. Unfortunately, the comma after the value didn't make it into the fix itself. Adding the comma to allow compilation of style. Task-number: QTBUG-8193 Reviewed-by: TrustMe
* QS60Style draws drop area as a black rectSami Merila2010-02-151-0/+2
| | | | | | | | | | | 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
* Polishing QS60Style by removing compiler warningSami Merila2010-01-271-5/+4
| | | | | | | | | Removes one compiler warning caused by animation support additions (member variables are initialized in incorrect order in default constructor). Also, removing unnecessary struct variable and one unnecessary scope definition. Reviewed-by: Alessandro Portale
* QListWidget itemActivated does not follow S60 conventionsSami Merila2010-01-251-0/+1
| | | | | | | | Set StyleHint SH_ItemView_ActivateItemOnSingleClick inactive for 3.x and 5th edition S60. Task-number: QTBUG-6182 Reviewed-by: Alessandro Portale
* S60Style: Add support for animations to styleSami Merila2010-01-221-1/+104
| | | | | | | | | | Add support of theme animations to AVKON-based QS60Style. Currently only QProgressBar's have animations, but adding others with same kind of S60 theming (mainly note animations) would be really easy to do. Task-number: QTBUG-4050 Reviewed-by: Alessandro Portale
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-131-1/+1
|\ | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Do not set the font size unnecessarily in the simulated s60 style.Christian Kamm2010-01-111-2/+3
|/ | | | Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
* QS60Style: Groove changes caused build break of S60 3.1Sami Merila2009-12-111-0/+1
| | | | | | | | 3.1 does not have theme graphics IDs that we use in style, so it cannot be compiled in 3.1. As a fallback, 3.1 will use the previous method of drawing a slider. Reviewed-by: Alessandro Portale
* QS60Style: Style does not support pressed state for slidersSami Merila2009-12-111-1/+4
| | | | | | | | Currently there is no visual clue that slider is "sunken" (pressed state). There is S60 theme graphic for it, so lets use it. Task-number: QTBUG-6722 Reviewed-by: Janne Koskinen
* QS60Style: Slider groove is incorrectSami Merila2009-12-111-0/+5
| | | | | | | | Style uses just a line as slider groove, when S60 provides themed graphics for it as well. Task-number: QTBUG-6723 Reviewed-by: Janne Koskinen
* Crash: when opening the File Dialog in Media Player (armv5)Sami Merilä2009-12-081-1/+1
| | | | | | | | | | | | This is due to NGA API changes in Tb9.2. Because of API changes, S60Style needs to have a lot of internal changes. First, the changed style no longer itself tries to uncompress and handle CFbsBitmaps, but instead uses the QPixmap backend for it. Second, all references to CFbsBitmap::DataAddress() have been removed. Third, the lookup table for theme parts has been cleaned up. Task-number: QTBUG-4644 Reviewed-by: Janne Koskinen
* Tidyup QS60Style - remove unused constants, replace magic valuesSami Merilä2009-11-261-9/+0
| | | | | | | | | | | Basically this has three minor fixes: - remove unused style parts that were left over after unifying textEdit and lineEdit graphics - make radiobutton indicator one pixel smaller so it is perfect circle - replace magic "10" with calculated value Reviewed-by: Alessandro Portale
* Removed unused setThemePalette(QStyleOption *option)Alessandro Portale2009-11-251-2/+0
| | | | | | Not used or missed, anywhere. Reviewed-By: Trustme
* LineEdit graphics are sometimes missing from webpages with s60styleSami Merilä2009-11-171-0/+4
| | | | | | | | | | | | | | | | | | If the webpage does define BODY colors for background, it is possible that lineEdits are not drawn at all. Actually, they are drawn but with transparent background, which makes them near-invisible. This is due to that QS60Style tries to check if the themePalette has been changed and if it has forwards the drawing of that particular widget to common style. Common style unfortunately uses active style's palette to draw the widget. S60Style defines Base to be transparent (to get the theme background shine through) and common style tries to use Base to draw lineEdit. End result is transparent lineEdit on webpage. This fix makes more educated deduction when it tries to see if style has been changed. This is related to QTBUG-4885. Task-number: QTBUG-4885 Reviewed-by: Janne Koskinen
* Fix typo in license headerAlessandro Portale2009-11-121-1/+1
| | | | | | The word 'module' was missing. Reviewed-By: TrustMe
* Removed unused public Api from QS60StyleAlessandro Portale2009-11-101-8/+0
| | | | | | | | | | | | | | | QS60Style::setStyleProperty() and QS60Style::styleProperty() were intended as generic property setter/getters, but are not needed anymore. Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp modified: src/gui/styles/qs60style.h modified: src/gui/styles/qs60style_p.h modified: src/gui/styles/qs60style_s60.cpp modified: src/gui/styles/qs60style_simulated.cpp modified: src/s60installs/eabi/QtGuiu.def
* QS60Style: Harmonize theme graphic with LineEdit and QTextEditSami Merilä2009-11-051-1/+0
| | | | | | | | | | | | In S60 the single line and multi line editors have same theme background. We should share one as well. Now we are using fancy notepad graphic with QTextEdit, but it makes QTextEdits to look apart from QLineEdits and in some themes it is styled rather badly (as it is not a central graphic item in a theme). Therefore it is better to use one and same graphic for both widgets. Task-number: QTBUG-5259 Reviewed-by: Alessandro Portale
* QS60Style does not mix well with the stylesheetsSami Merilä2009-10-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QS60Style basically ignores user set / stylesheet set palettes. Now, tested with: * QLineEdit * QPushButton * QSpinBox * QComboBox * QAbstractScrollArea * QCheckBox * QRadioButton * QGroupBox * QFrame * QTreeView * QTableView * QHeaderView * QProgressBar * QScrollBar * QSplitter * QSlider * QTabWidget * QToolButton * QToolBar and fixed QS60Style so that it obeys externally set palettes. Task-number: QTBUG-4820 Reviewed-by: Janne Koskinen
* S60Style's tab widget is too small for touch useSami Merilä2009-10-211-0/+2
| | | | | | | | | | TabWidget for S60Style is too small for touch use, it is rather hard to accurately touch the tabpane to switch the active tab. To fix this, we ask the native tabpane height from AVKON and set the QTabWiget's pane height to native height (or bigger). Task-number: QTBUG-4243 Reviewed-by: Alessandro Portale
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Using QFocusFrame to visualize the focus.Alessandro Portale2009-08-281-2/+4
| | | | | | | | | | | | | | | | | | When using the keypad navigation, the focus state of a widget is supposed to be well visible. So it makes much sense to use QFocusFrame, which is able to paint a focus marker _around_ the widget. This change should fix the issue that with some S60 themes, the focus was invisible. Also, a lot of code is removed by this change. Task-number: 256470 Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp modified: src/gui/styles/qs60style.h modified: src/gui/styles/qs60style_p.h
* Changed names and URLs to reflect name change.axis2009-08-191-1/+1
| | | | RevBy: Trust me
* Cleaned public Api of QS60Style due to review by Volker Hilsheimer.Alessandro Portale2009-08-111-0/+5
| | | | | | | Moved handleDynamicLayoutVariantSwitch and handleSkinChange from QS60Style to QS60StylePrivate. QApplication (the only one calling those functions) is now a friend, thus has access to the private class.
* Update license headers according to commit 858c70f768e.axis2009-08-061-3/+3
| | | | RevBy: Trust me
* Replaced $MODULE$ with hardcoded module names.axis2009-08-061-1/+1
| | | | RevBy: Trust me
* Trailing whitespace and tab/space fixes for src/guiJanne Anttila2009-08-041-1/+1
|
* Squashed commit of the topic/exceptions branch.Harald Fernengel2009-08-031-1/+1
| | | | | Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
* S60Style: Styled graphic support for editors.Sami Merilä2009-06-051-1/+12
|
* Prevent double deletion of m_themePaletteAlessandro Portale2009-06-051-3/+4
| | | | RevBy: Sami Merila