summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QS60Style: Custom QPushButton: Heigth is calculated wronglySami Merila2010-03-301-1/+1
| | | | | | | | | | | | | | If button contains a layout with widgets instead of having direct label and icon, QS60Style calculates the size of the content incorrectly. This is regression for a fix to QTBUG-7586. Now style ignores orginal size of pushbutton and tries to calculate correct height by itself. Issue is fixed by selecting teh bigger of orginal height and calculated height. Task-number: QT-3197 Reviewed-by: Alessandro Portale
* QS60Style: very tall QSpinBox's buttons hide lineEditSami Merila2010-03-291-9/+18
| | | | | | | | | | | | | | | | If the spinbox is very tall considering its width (ratio 2:1), the spinbuttons can easily hide the lineEdit when they are scaled up. For example QSize(200, 100) QSpinBox does not have any lineEdit at all, since spinbuttons are scaled up to be 100*100 squares and deployed side-by-side. As a fix, once spinbuttons occupy half of the total width of spinbox, they stop growing. For very tall spinboxes, spinbuttons are deployed one top of the other, to make the lineEdit bigger. Task-number: QTBUG-9321 Reviewed-by: Alessandro Portale
* Fix for submenu placement for QMenus in Symbian.Janne Anttila2010-03-251-7/+0
| | | | | Task-number: QTBUG-5992 Reviewed-By: Sami Merila
* QMessageBox is smaller than native MessageBoxSami Merila2010-03-251-13/+22
| | | | | | | | | | | | | | | | | | | 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
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6Sami Merila2010-03-231-22/+19
|\
| * Increase KeypadNavigation focus visibilityAlessandro Portale2010-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | The focus frame was drawn with a low opacity. That was intended meant to increase aesthetics but in reality decreased usability. Now, the opacity is higher. But still with a difference between navigation mode and edit mode. Task-number: QT-826 Reviewed-by: Sami Merila
| * Fixing keypad navigation focus frameAlessandro Portale2010-03-221-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QFocusFrame drawing code in QS60Style incorrectly assumed that PM_LayoutSpacing is always equal to PM_FocusFrameMargin. When these values diverged, the focus frame broke as described in task QTBUG-8036. The fix makes the drawing more robust. The focus frame width is never thicker than PM_LayoutSpacing and PM_FocusFrameMargin. And instead of drawing a roundRect with calculated pen width, we are now filling a roundRect. That makes the focusFrame more apparent. Task-number: QTBUG-8036 Reviewed-by: Sami Merila
* | Remove internal custom pixel metric enumsSami Merila2010-03-231-15/+15
| | | | | | | | | | | | | | | | 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-7/+5
| | | | | | | | | | | | | | 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/+7
|/ | | | | | | | | | 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
* QS60Style: All itemviews should indicate selection with tick markSami Merila2010-03-221-3/+3
| | | | | | | | | | | | In QS60Style, all itemviews should indicate selection/multiselection with tick mark. Unfortunately it now uses object casting to QListView currently to check the viability of widget to have tick mark. Thus, it fails for QTreeViews and QTableViews. Changing object casting to QAbstractItemView to support all item views. Task-number: QTBUG-9212 Reviewed-by: Alessandro Portale
* Virtual Keyboard and double tap for Symbian supportSami Merila2010-03-191-3/+6
| | | | | | | | | | | For Sym^3 devices, we need to launch virtual keyboard with single tap of editing widget. This can be handled in the style by setting SH_RequestSoftwareInputPanel to RSIP_OnMouseClick with Sym^3 devices. For earlier devices, the stylehint remains as RSIP_OnMouseClickAndAlreadyFocused. Task-number: QT-3137 Reviewed-by: Janne Koskinen
* Set PM_MenuScrollerHeight to zeroSami Merila2010-03-171-5/+5
| | | | | | | | | | | | | | | Previously QS60Style didn't define a pixel metrics value for PM_MenuScrollerHeight at all and value was fetched from qcommonstyle. However, QS60Style didn't draw the CE_MenuScroller area at all, so menuscrollers were layoutted and drawn. Thus, long menus were left with a 'hole' in them. With this fix, PM_MenuScrollerHeight is zero. This is related to QT-2274. Task-number: QT-2274 Reviewed-by: Alessandro Portale
* Change QS60Style to use combobox popup menuSami Merila2010-03-171-3/+23
| | | | | | | | | | | | | | | | | | | | Instead of using traditional dropdown menus, use popup menu, like native side does. Related to https://qtrequirements.europe.nokia.com/browse/QT-2274 Popup is positioned according to S60 popup position rules: - in portrait at the bottom, with square popup (dimension is screen width minus border) - in landscape, centered on Y-axis, on X-axis to the right border (with LeftToRight UI direction) Background behind popup is dimmed. Popup has automatic scrollbar if content does not fit into the popup. Popup background graphic is S60 dialog graphic. Task-number: QT-2274 Reviewed-by: Alessandro Portale
* QS60Style ignores widget palette when drawing highlighted widget textSami Merila2010-03-051-13/+35
| | | | | | | | | | | | | | | | | Currently: QS60Style does not polish widgets with highlight colors. Instead it fetches color information from native theme side and uses that color for drawing the text. http://bugreports.qt.nokia.com/browse/QTBUG-8704 Fix: All widgets with highlighted text (lists, tables, headers, tabs, radiobuttons and checkboxes) polish their palette. This palette value is then used in the drawing code. Earlier it was not possible for developers to define their own highlight text color, now it is possible. Task-number: QTBUG-8704 Reviewed-by: Janne Anttila
* Supressed Icon sizes on QPushButton in QS60StyleSami Merila2010-02-191-2/+12
| | | | | | | | QS60Style should have smaller button margins when icon height is larger than text height within a button. Task-number: QTBUG-7586 Reviewed-by: Alessandro Portale
* QWebView scrolling doesn't clear old elements before painting againSami Merila2010-02-181-7/+16
| | | | | | | | | | | | | | | | | 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
* QS60Style: Branch indicator in tree view is misplacedSami Merila2010-02-151-7/+9
| | | | | | | | | Fix for QTBUG-7258 make itemview margins larger. This broke the treeviews visually, as indicators are not shown in correct places. Now, indocators are placed correctly for treeviews as well. Task-number: QTBUG-7995 Reviewed-by: Alessandro Portale
* Scroll bar handle/groove ends are squeezed (in nHD resolution)Sami Merila2010-02-151-4/+7
| | | | | | | | | | | | QS60Style uses non-square area for scrollbar end graphics areas. It then tries to scale the areas to make them look like native graphics (and keeps the width-height ratio), thus squeezing them. Change style so that scrollbar end areas are squares, just like in native graphics they are. Task-number: QTBUG-7996 Reviewed-by: Alessandro Portale
* QS60Style draws drop area as a black rectSami Merila2010-02-151-2/+9
| | | | | | | | | | | 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
* Remove scrollbar context menu from QS60StyleSami Merila2010-02-151-0/+3
| | | | | | | | | | Currently style does not forbid scrollbar context menu, so by default long pressing over the scrollbar widget shows the context menu. This is not according to 'S60-style', so from now on the stylehint SH_ScrollBar_ContextMenu returns false. Task-number: QTBUG-8194 Reviewed-by: Alessandro Portale
* Change a name of a variable to be more descriptiveSami Merila2010-02-141-2/+2
| | | | | | | | Currently when calculating a button content size, QS60Style has a variable called buttonWidth, which actually is the width of the content, not the button itself. Change this to buttonContentWidth. Reviewed-by: TrustMe
* Compile fix for non-Symbian compilersAlessandro Portale2010-02-031-7/+8
| | | | Putting the code for "case CT_ComboBox:" into {}
* List item margins are too small due to invalid pixel metric valueSami Merila2010-01-291-8/+8
| | | | | | | | | | | | | Pixel metric values for PM_FocusFrameVMargin and PM_FocusFrameHMargin were based on AVKON grid layout. Apparently, AVKON has a major difference for text margin in lists and grids. List values are almost double of what is used in the grids. Original values were poor fit for list usability, it made the text items very close to each anothre. Task-number: QTBUG-7258 Reviewed-by: Alessandro Portale
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-01-281-15/+7
|\ | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Remove left over forward declarations Avoided the loss of preedit text when losing focus on Symbian. Added support for ifdeffing for manufacturer in generated pkg files Shortening and fixing previous fix for QTBUG-6371 Update default FPU flags on Symbian to be softvfp+vfpv2 Using RunFast mode for RVCT
| * Shortening and fixing previous fix for QTBUG-6371Alessandro Portale2010-01-281-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shortening: Use much mor code from CommonStyle Fixing: Subtract PM_Layout[Left|Right]Margin from desktop width. This fix is anyways not relly useful. It heals some Ui designs with sizeconstrains which do not fit into mobile screens. But it will fail In following situations: Widget, and a too-long combobox in a horizontal Layout. The combobox would be cropped to Desktop width but the widget(s) left and/or right of the Combobox are not considered. So, that the Ui still is too wide. The correct fix will be for set the size policy of the combobox to something less greedy. Task-number: QTBUG-6371 Reviewed-by: Sami Merila modified: gui/styles/qs60style.cpp
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-281-0/+4
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (70 commits) doc: Fixed the last qdoc errors. doc: Document the "Type" enum value as a const in variable. Designer: Add lower/raise to context menu. Compile with no-webkit - add missing semi-colons. Fixes visibility update missing when doing setParentItem on graphicsitem Stabilize tst_QGraphicsScene::polishItems2 (new test) Fixed an infinite loop that could occur when reading invalid BMP images. Updated docs regarding QGLWidget::renderText() limitations. Added optimization flag to QGraphicsItemPrivate. Fixed child items with graphics effects not inheriting opacity. Made the trace replayer handle limited resolution cases better. Small optimization in raster paint engine. Another ASSERT while deleting spans Implement QDirectFBPixmapData::scroll Potential crash when adding items from QGraphicsWidget::polishEvent(). QGraphicsWidget is painted twice on the inital show. Fix QPainter::redirection() to pass autotest. Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. revert parts of 10392eef4fd4f9 Fix y-inverted pixmaps properly. ...
| * doc: Fixed the last qdoc errors.Martin Smith2010-01-281-0/+4
| |
* | QComboBox drawn incorrectly in RightToLeft modeSami Merila2010-01-271-5/+7
| | | | | | | | | | | | | | | | | | QS60Style does not regard layout orientation when calculating subrects for QComboBox. This leads to a situation where button is not visible on UI with RightToLeft orientation. Task-number: QTBUG-7584 Reviewed-by: Alessandro Portale
* | Polishing QS60Style by removing compiler warningSami Merila2010-01-271-1/+1
|/ | | | | | | | | 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
* Remove warningsAlessandro Portale2010-01-261-7/+5
| | | | | | | | MSVC revealed some issues that are worth a warning. Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp
* Fix broken build of simulated QS60StyleAlessandro Portale2010-01-261-1/+3
| | | | | | | | | The QProgressBar animating code is not meant for the simulated style. ifdef it out. Reviewed-by: Sami Merila modified: src/gui/styles/qs60style.cpp
* QFileDialog layout issue on Symbian (part2)Sami Merila2010-01-261-0/+1
| | | | | | | Added missing #include. Task-number: QTBUG-6371 Reviewed-by: Alessandro Portale
* QFileDialog layout issue on SymbianSami Merila2010-01-261-0/+18
| | | | | | | | | If long path (or any other long string) is added to a combobox, it grows outside of screen area. QS60Style needs to check that widget will not grow wider than screen area. Task-number: QTBUG-6371 Reviewed-by: Alessandro Portale
* QListWidget itemActivated does not follow S60 conventionsSami Merila2010-01-251-1/+1
| | | | | | | | Set StyleHint SH_ItemView_ActivateItemOnSingleClick inactive for 3.x and 5th edition S60. Task-number: QTBUG-6182 Reviewed-by: Alessandro Portale
* Remove unnecessary scope definitions from QS60StyleSami Merila2010-01-251-70/+70
| | | | Reviewed-by: Alessandro Portale
* QS60Style: Combobox button is not drawn pressedSami Merila2010-01-251-75/+35
| | | | | | | | | | | Currently S60Style ignores the pressed down state when drawing the combobox button. This is due to button drawing picking up wrong QStyleOption (just initialized, no correct style data applied). Greatly simplified toolbutton drawing and fixed the combobox to use correct QStyleOption. Task-number: QTBUG-6950 Reviewed-by: Alessandro Portale
* RadioButtons/Checkboxes should have theme highlightSami Merila2010-01-251-0/+65
| | | | | | | | | | | Currently only keypad navigation focus is drawn to RadioButtons and CheckBoxes in non-touch devices. However, in S60 the native widgets have themed highlight (similar to lists). This task will add that highlight support for these widgets regardless if keypad navigation is active or not. Task-number: QTBUG-5536 Reviewed-by: Alessandro Portale
* QListView::setAlternatingRowColors is not workingSami Merila2010-01-251-4/+21
| | | | | | | | | | | | | | QS60Style does not really support alternating line/cell backgrounds. This is due to that no such thing exists on native side and we are using a graphical theme image as list/table background. For style, we'll use QPalette::Light with some transparecy to achieve this. Light is guaranteed to have good contrast with theme background as it is derived from QPalette::Button, which is calculated from button graphics, which *should* be used on top of theme background. Task-number: QTBUG-5980 Reviewed-by: Alessandro Portale
* S60Style: Add support for animations to style (part2)Sami Merila2010-01-221-0/+1
| | | | | | | Missing #include added to avoid build break. Task-number: QTBUG-4050 Reviewed-by: Alessandro Portale
* S60Style: Add support for animations to styleSami Merila2010-01-221-27/+116
| | | | | | | | | | 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
* Fix for symbian dialog background transparency.Jani Hautakangas2010-01-221-5/+7
| | | | | | | If Avkon components support transparency then dialog background is transparent enabling rounded corners. Reviewed-by: Sami Merila
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-131-1/+1
|\ | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-121-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (73 commits) doc: update snippets for QtScript function expressions Prevent a crash when creating an inputContext from the QApplication dtor. QNAM HTTP Code: Cache socket state inside ensureConnection() tst_qhttpnetworkconnection: Test also HEAD in some tests tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities QNAM HTTP Code: When starting new request, prefer connected sockets. typo fix Added the 'framecapture' WebKit example to the default build. Fix code example fix typo in qreadwritelock's documentation QNAM HTTP: Don't call d_func() so often QNAM HTTP: Fix readBuffer maximum size. QNAM HTTP: Optimize eatWhitespace() QNAM HTTP: Check if socket already tries to connect. network internals: fix build on S60 [syncqt] Make -separate-module work with WebKit's directory structure doc: Corrected explanation of when append() does nothing. doc: Added clarification about allocating space for the 0 terminator. Add a way to access the normalised URL in QUrl. [syncqt] Make it possible to synchronize headers for a separate module ...
| | * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-01-121-3/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: (21 commits) QFile cannot deal with crlf-translated stdio, so use binary mode remove trimming of (expected) output really fix the autotest support regexp-like quantifiers of expected output lines remove superfluous \r filtering print actual rather than expected output for matching text Do not set the font size unnecessarily in the simulated s60 style. Doc typos fixed Translations: Update German for 4.6.1 fix test under windows don't complain about unresolved base when the reference is absolute make the lupdate tests more verbose in case of failure don't use qmake for test setup move equivalent of output_ts test to good/ look for the .result file in the dir where the output is expected to go fix sametext and number heuristics fix number heuristics, part 1 no point in specifying -ts when a .pro file is specified clean up the lupdatecmd files tidy up the test .pro files ...
| * | Do not set the font size unnecessarily in the simulated s60 style.Christian Kamm2010-01-111-3/+6
| |/ | | | | | | Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
* | Fix for QTBUG-7267 Qs60Style::drawControl() does not align CE_ItemViewItemJani Hautakangas2010-01-111-1/+1
|/ | | | | | | | | control element correctly if given widget is null. Uses now alignment hint value given in style option. Task-number: QTBUG-7267 Reviewed-by: Janne Koskinen
* Minor optimization for QS60StyleSami Merila2009-12-231-3/+3
| | | | | | | Ask selected state only once in QS60Style when handling element CE_TabBarTabLabel. Reviewed-by: TrustMe
* Correcting white space in QS60StyleSami Merila2009-12-231-76/+76
| | | | Reviewed-by: TrustMe