summaryrefslogtreecommitdiff
path: root/src/gui/styles
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.6Sergio Ahumada2012-11-2761-1098/+1098
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I8b2ed2e09e9beb46bdda354017c29f00be6ae76f Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year to 2011.Jason McDonald2011-01-1161-61/+61
| | | | Reviewed-by: Trust Me
* 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
* Fix style sheet error with slider handleqCaro2010-06-071-1/+1
| | | | Reviewed-by: Olivier
* QS60Style: In S60 3.x and 5.0 Qt itemviews behaviour is not nativelikeSami Merila2010-05-141-3/+7
| | | | | | | | | | | | | Currently style defines QStyle::SH_ItemView_ActivateItemOnSingleClick, which leads to itemview item activation only occur on double-click (or tap). The item selection work native-like on Sym^3. As a correction, style needs to check the passed styleoption and check whether or not the state "Selected" is on. In these cases, the itemactivation can proceed. Task-number: QTBUG-10697 Reviewed-by: Miikka Heikkinen
* QS60Style will draw focus frame to a PushButton with any stylesheetingSami Merila2010-05-101-2/+3
| | | | | | | | | | | Due to incorrect braces in the if-within-if, QS60Style decided to use QCommonStyle for styling focus frame into QPushButton when button had *any* kind of stylesheet. Corrected the braces. Task-number: QTBUG-10549 Reviewed-by: Alessandro Portale
* QS60Style: QTreeView branch indicators are drawn incorrectly in RtoLSami Merila2010-05-073-34/+46
| | | | | | | | | | | | 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-072-15/+10
| | | | | | | Fix whitespace, remove unneeded code, break very long lines to two rows. Reviewed-by: Alessandro Portale
* QS60Style - PushButton with text and with icon should be of same sizeSami Merila2010-05-071-1/+1
| | | | | | | | | | | | When pushbutton contains standardIcon or non-modified text, it should be of same size. As a fix, style now checking default text height for icon pushbuttons and if the icon is smaller than text height, style will make button to match text height content. Task-number: QT-2179 Reviewed-by: Alessandro Portale
* QS60Style: When context menu is open ToolButton is not pressed downSami Merila2010-05-071-5/+3
| | | | | | | | | | | | QS60Style prefers to use widget and calls its down() API. The value is not true unless tool button has been set down programmatically. Thus, we should rely on State_Sunken as well. As a fix, style asks from both the widget and checks the state before drawing button raised/pressed. Task-number: QTBUG-10487 Reviewed-by: Alessandro Portale
* QS60Style: Sliders are too smallSami Merila2010-05-061-10/+9
| | | | | | | | | | | | | | | Sometime back slider graphic in the QS60Style was changed to use the "new" slider graphic available in 5th Edition and newer SDKs (the old SDKs still use the slider graphic). However, at that time nobody noticed that the new slider has different size than the old one in the Nokia LAF document. To fix the sliders, updated the pixel metrics calculation rules to use the new slider LAF data. Also fixed a grpahic start and end part rounding to match native look. Task-number: QTBUG-10454 Reviewed-by: Alessandro Portale
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-05-061-0/+8
|\ | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: QS60Style: QCalendarWidget draws only one-digit dates Add spectrum analyzer demo app
| * QS60Style: QCalendarWidget draws only one-digit datesSami Merila2010-05-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Due to largish pixel metrics values for text margins, content does not fit into QCalendarWidget date-cells. To fix this, the failing pixel metric values are halved for QTableViews and its derivatives. This matches native margins almost perfectly (depending on native layout 1-2 pixel offset). Task-number: QTBUG-10417 Reviewed-by: Alessandro Portale
* | WindowsMobileStyle: fix QTreeView indicator sizeJoerg Bornemann2010-05-051-0/+44
|/ | | | | Task-number: QTBUG-7364 Reviewed-by: thartman
* QS60Style: QTabWidget icon size property doesn't workSami Merila2010-05-041-2/+3
| | | | | | | | | | | QS60Style did check if the tab icon size was larger than pixel metric for default tab icon size. If it was, then it reset the icon size to match pixel metric. It was impossible to set large icon to tab widget. As a fix, this check was removed from style. Task-number: QTBUG-3102 Reviewed-by: Jason Barron
* QS60Style: QTabWidget Usability issue with capacitive screensSami Merila2010-05-031-11/+55
| | | | | | | | | | | | | | | | | | Normally Qt uses scrollbuttons together at right (for LeftToRight UI) side of the horizontal QTabBar; for vertical tab bar, scrollbuttons are displayed below/above the widget. Using QTabBar's scroll buttons with touch device that has capacitive screen, is somewhat hard as the touch area for either of the scroll buttons is somewhat smallish. So user is experiencing frequent wrong taps. Making the touch area larger, would make the tabbar tab shape area smaller, so it isn't a very good solution. Therefore, when QS60Style is in use, QTabWidget draws the scrollbuttons on either side of the QTabBar. Task-number: QT-3104 Reviewed-by: Alessandro Portale
* QS60Style: Menu separators are not drawn, yet they take up screen spaceSami Merila2010-04-261-0/+6
| | | | | | | | | | | | Currently, QS60Style does not draw menu separators at all, yet they are calculated to take screen estate. Remove the screen reservation from them. See also QTBUG-10054 for details to add menu separator support to style. Task-number: QTBUG-10191 Reviewed-by: Alessandro Portale
* QS60Style: QMenu behaves badly with a lot of menu itemsSami Merila2010-04-261-9/+16
| | | | | | | | | | | | | | | | | Due to recent change in QS60Style where combobox menu was changed to popup menu, instead of dropdown menu, long QMenus now work sloppily. This is due to that pixel metric PE_MenuScrollerHeight was set to zero to avoid "non-drawn" areas in combobox popups. Of course, QMenu scrolling really needs the scrolling area if it is to make any scrolling. As a solution, scroller height is now zero for combobox popup and in QMenu it is the height of itemview item (for "standard" content), but no any scroller indication is drawn. The menu scrolls automatically when bottom/top part of menu list is highlighted. Task-number: QTBUG-10073 Reviewed-by: Janne Koskinen
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-212-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: tst_QSystemSemaphore::processes fixed for WinCE tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE tst_qsharedmemory: create multiple instances of lackey.exe on WinCE tst_qsharedmemory: fix deployment of lackey.exe for WinCE fix compilation of tst_sharedmemory on Windows CE examples/widgets/stylesheet fix mainwindow.ui QStyleSheetStyle: fix memory leak on base style change
| * QStyleSheetStyle: fix memory leak on base style changeJoerg Bornemann2010-04-212-1/+9
| | | | | | | | | | | | | | | | On every change of the base style it is inserted into styleSheetCache. If the base style gets destroyed, it must be removed from the cache. Task-number: QTBUG-4074 Reviewed-by: ogoffart
* | QS60Style: Style draws a focus frame to context menus and popupsSami Merila2010-04-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently QS60Style draws a ficus frame around context menus and combobox popups. This should be removed, as these widgets have keypad navigable item highlight rect inside them AND the widgets cannot be navigated in/out from other widgets. Also, currently there is no room to draw the focus frame to left and right border, so the focus frame looks somewhat strange theme colored think line above and below popup/menu. Task-number: QTBUG-10064 Reviewed-by: Alessandro Portale
* | Context menu for application is differs from native S60 appsSami Merila2010-04-202-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Slider graphics does not look correct in N95 (part2)Sami Merila2010-04-151-1/+2
| | | | | | | | | | The original fix for this, only fixed horizontal widgets. But the same issue can be reproduced also with vertical widgets. This latter fix replaces the orginal fix. Task-number: QTBUG-9854 Reviewed-by: Alessandro Portale
* Slider graphics does not look correct in N95Sami Merila2010-04-151-0/+1
| | | | | | | | | | | | The upscaling of theme graphics fails, if the original rect is taller than upscaled graphics rect height. This makes the start and end parts of the graphics appear as shorter then they should be. Fixed by forcing the destrination rect height to be used after upscaling the graphics. Task-number: QTBUG-9854 Reviewed-by: Janne Anttila
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-04-141-21/+23
|\ | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: QS60Style: HouseKeeping task QS60Style: In a very short combobox, text is cut QS60Style: Sometimes progressbars do not animate Implement OpenVG buffer scrolling and enable it on Symbian.
| * QS60Style: HouseKeeping taskSami Merila2010-04-141-10/+9
| | | | | | | | | | | | | | | | | | Remove unnecessary comment. Added one @todo comment. Some whitespace corrections. Removed unnecessary QStyle scopes. Reviewed-by: Alessandro Portale
| * QS60Style: In a very short combobox, text is cutSami Merila2010-04-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QComboBox is very short, it is possible that the combobox text is cut. This is due to two reasons: 1) Style does not take into account text eliding (which should be preferred over clipping) 2) Clipping text rect is done with orginal text rect, before it is adjusted for borders, icons etc. Style is changed that it doesn't use clipping rect and uses text eliding. Task-number: QTBUG-9837 Reviewed-by: Alessandro Portale
| * QS60Style: Sometimes progressbars do not animateSami Merila2010-04-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | Style removes every progressbar from animation list whenever *any* QWidget is hidden/shown. To ensure that the animation list is only tempered with possible animation supporting qwidgets, re-interpret cast them to QProgressBar. If this works, then clear the animation list. Task-number: QTBUG-9836 Reviewed-by: Alessandro Portale
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-141-2/+14
|\ \ | |/ |/| | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QAbstractScrollArea StyleSheet: fix drawing of border with SH_ScrollView_FrameOnlyAroundContents
| * QAbstractScrollArea StyleSheet: fix drawing of border with ↵Olivier Goffart2010-04-141-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SH_ScrollView_FrameOnlyAroundContents - Since Qt 4.6.0, the frame is drawn by PE_Widget, but there we do not take in account the scrollbar for the case where SH_ScrollView_FrameOnlyAroundContents is true. - We also reserved too much space for the border, as we included the native border as well in the computation, so do not reserve additional space by setting PM_ScrollView_ScrollBarSpacing to 0 Task-number: QTBUG-9821 Reviewed-by: jbache
* | QS60Style: Single Click UI support for SD 9.2 time-boxSami Merila2010-04-133-53/+170
|/ | | | | | | | | | | | 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
* 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
* Fix a crash in QGtkStyle when theme not availableJens Bache-Wiig2010-03-301-0/+3
| | | | | | | | subElementRect failed to verify that the theme was resolved before accessing certain data structures. Reviewed-by: ogoffart Task-number: QTBUG-9240
* 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
* 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
* 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-254-23/+37
| | | | | | | | | | | | | | | | | | | 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
* 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-232-23/+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-223-10/+8
| | | | | | | | | | | | | | 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-223-0/+19
| | | | | | | | | | | | | | | | | | | | 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
* | 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
* 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
* 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 branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-191-6/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: fix QTabBar scroll button arrow position in Windows mobile style Revert "Optimize getting bearings of a glyph on Windows for true type fonts" stabilize tst_QAccessibility::comboBoxTest Better handling for NOTIFY in QGraphicsWidget regarding geometry changes Add NOTIFY to size property so QML bindings are working fine. Implement Q_PRIVATE_PROPERTY that allows you to declare properties fix PM_TabBarScrollButtonWidth pixel metric in Windows mobile style Stabilize taskQTBUG_7863_paintIntoCacheWithTransparentParts auto-test. Optimize getting bearings of a glyph on Windows for true type fonts Fixes blending problem when paiting non-opaque items with cache enabled. Optimize speed of QTextLayout and QPainter::drawText Fix a crash in animation groups when deleting uncontrolled animations
| * fix QTabBar scroll button arrow position in Windows mobile styleJoerg Bornemann2010-03-191-2/+6
| | | | | | | | | | Task-number: QTBUG-8757 Reviewed-by: thartman