summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
Commit message (Collapse)AuthorAgeFilesLines
* QGtkStyle refactoringRobert Griebl2009-11-039-1331/+1437
| | | | | | | | | | | | The QGtk class has been refactored into a private d class for QGtkStyle. This allows us to re-use a lot of code for the Maemo5 style without changing a single line in QGtkStyle itself plus we can easily add virtual functions where the two styles need to behave different. There shouldn't be any new functionality added (or old functionality lost) by this commit. Reviewed-By: jbache Reviewed-By: Ralf Engels
* Merge commit 'origin/4.6' into featureJørgen Lind2009-11-0215-236/+422
|\
| * Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley T. Hughes2009-10-307-47/+208
| |\
| | * Fix tab widget painting in QGtkStyle with reverseJens Bache-Wiig2009-10-085-26/+154
| | | | | | | | | | | | | | | | | | | | | | | | This also adds QStyleOptionTabWidgetFrameV2 so that we do not have to do ugly hacks in the style to obtain it. Task-number: QTBUG-5187 Reviewed-by: ogoffart
| | * Tabs with corner widgets are drawn incorrectly in document mode on Mac.Prasanth Ullattil2009-10-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While drawing the tabbar frame, mac style needs the QTabBar pointer to calculate the correct size. Since the QTabWidget also uses the PE_FrameTabBarBase to draw background of the corner widgets, the mac style has to use position passed with the style option. This only works with horizontal tabs. Reviewed-by: Jens Bache-Wiig
| | * Fix a combobox autotest on VistaJens Bache-Wiig2009-10-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The subcontrol rect offset was correctly reporting not to work on Vista style. The problem was that we were getting the size of the arrow by subtracting the xoffset. But this would mean that the Reviewed-by: ogoffart
| | * Fix split tool button drawing on Vista when not in a tool barJens Bache-Wiig2009-10-071-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a tool button is not in a tool bar on XP and Vista it will get a slightly different appearance from normal tool buttons. I resolved this by drawing a normal tool button with a divider line on top if the autoraise property is not set on the button. (which is by default enabled only for buttons in a tool bar). Task-number: QTBUG-5061 Reviewed-by: prasanth
| | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into ↵Bradley T. Hughes2009-10-282-4/+10
| | |\ | | | | | | | | | | | | 4.6-WM_NULL-driven
| | | * Selected tab is drawn incorrectly on Snow Leopard.Prasanth Ullattil2009-10-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default height of tab bar is 22 pixels in Snow Leopard. We used to draw tabs taller than 21 pixels to a pixmap and stretch to the required size. The limit is now changed to 22 pixels (which is the most common use case). The stretched drawing is not perfect in Snow Leopard due to some changes in how HITheme draws tabs. Reviewed-by: Jens Bache-Wiig
| | | * Merge branch '4.6' into 4.6-platformDenis Dzyubenko2009-10-266-39/+14
| | | |\
| | | * | Remove internal widgets from QApplication::topLevelWidgets()Prasanth Ullattil2009-10-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some internal hidden widgets which should not come up in the QApplication::topLevelWidgets() list. So the known ones are being removed from the QWidgetPrivate::allWidgets set. Task-number: QTBUG-739 Reviewed-by: Denis Dzyubenko Reviewed-by: Bradley T. Hughes
| * | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into origin-4.6Olivier Goffart2009-10-304-142/+176
| |\ \ \ \
| | * \ \ \ Merge branch '4.6-s60' into 4.6axis2009-10-304-142/+176
| | |\ \ \ \
| | | * | | | QS60Style does not mix well with the stylesheetsSami Merilä2009-10-294-124/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6axis2009-10-293-7/+34
| | | |\ \ \ \ | | | | |/ / /
| | | * | | | Draw QSplitter in QS60StyleSami Merilä2009-10-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously QS60Style did not draw CE_Splitter control at all. With this change, the style draws it when user presses the splitter down to make a drag. Since native side does not have splitter at all, we are drawing splitter rect as partially transparent rounded rect with QPalette::Light (which has been picked from active theme). Task-number: QT-686 Reviewed-by: Shane Kearns
| | | * | | | Use PM_SplitterWidth in QS60StyleSami Merilä2009-10-271-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated pixel metrics values from latest S60 layouts. Also, updated pixel metrics harvester to collect pixel metric for QSplitter. Task-number: QT-686 Reviewed-by: Shane Kearns
| * | | | | | Merge commit 'widget/4.6' into origin/4.6Olivier Goffart2009-10-305-44/+38
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/effects/qgraphicseffect.cpp
| | * | | | | Merge commit origin/4.6 into team-widgets/4.6Olivier Goffart2009-10-298-19/+42
| | |\ \ \ \ \ | | | | |/ / / | | | |/| | |
| | * | | | | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-286-39/+14
| | |\ \ \ \ \ | | | | |_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes3 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h
| | * | | | | Do not hardecode the ToolBar Icon SizeOlivier Goffart2009-10-273-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So we correctly get the size from the platform plugin Reviewed-by: jbache
| | * | | | | In Vista style, renaming Animation, Transition and PulseThierry Bastian2009-10-222-37/+37
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a name clash, so we prefixed them with QWindowsVista Reviewed-by: Benjamin Poulain
| * | | | | Remove a paintBox call that should have been moved a few lines down, but was ↵Robert Griebl2009-10-301-3/+0
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | instead copied in commit ea13922 Reviewed-by: TrustMe
* | | | | Fix QT_NO_GROUPBOXJørgen Lind2009-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | Reviewed-by: tom
* | | | | Fix QT_NO_IMAGEFORMAT_PNGJørgen Lind2009-10-291-2/+1
|/ / / / | | | | | | | | | | | | Reviewed-by: tom
* | | | Fix for Gtk+ toolbuttons and sliders.Robert Griebl2009-10-273-7/+34
| |_|/ |/| | | | | | | | | | | | | | Maemo5 looks very weird without these patches. Reviewed-By: jbache
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6axis2009-10-276-39/+14
|\ \ \ | | |/ | |/|
| * | Merge branch '4.5' into 4.6Thiago Macieira2009-10-231-28/+3
| |\ \
| | * | QWindowsMobileStyle::drawPrimitive(PE_Frame) background color fixedJoerg Bornemann2009-10-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background color of PE_Frame was palette().light() and has been changed to use palette().background() now. This fixes the autotest tst_QStyleSheetStyle::task188195_baseBackground for Windows mobile. Reviewed-by: thartman
| | * | move default QAbstractButton font setup on Win mobile to QApplicationJoerg Bornemann2009-10-221-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original approach of modifying the font for QAbstractButtons in QWindowsMobileStyle::polish broke the autotest tst_qstylesheetstyle::fontPropagation. Reviewed-by: thartman
| * | | Line spacing fixesJoerg Bornemann2009-10-235-11/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* | | Remove compilation warning from QtGuiSami Merilä2009-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QS60Style causes a compilation warning due to using incorrect parameter when adjusting rect size in adjusted() call. The problematic line is using twice same parameter and thus leaves one pre-set parameter unused, which causes a compilation warning. Fixed by using the correct parameter. Task-number: N/A Reviewed-by: Trust Me
* | | QtGui release/debug binary compatibilityShane Kearns2009-10-224-11/+7
|/ / | | | | | | | | | | | | | | QtGui had some debug functions only exported in the debug build. Now these are exported in release mode as well, but as stubs (i.e. no debug output is generated). Reviewed-by: Thiago Macieira
* | Cleaned up the API of the Symbian event hooks.axis2009-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two major points were: - Replacing "s60" with "symbian" in all event handling functions, since there is nothing S60-specific about them. - Replace the Symbian event types with the encapsulating QSymbianEvent container. This allows us to cope with more types of events in the future without having to add new virtual functions. AutoTest: QWidget passed Task: QT-1156 RevBy: Jason Barron RevBy: Shane Kearns RevBy: Sami Merila
* | fix editable comboboxes in the Windows mobile styleJoerg Bornemann2009-10-211-31/+73
| | | | | | | | | | | | | | | | In editable QComboBoxes we used cutting-edge technology to display the text. But that's not always wanted. We actually want to see all pixels of a string like "why oh why". The lower edge was cut off. Reviewed-by: thartman
* | S60Style's tab widget is too small for touch useSami Merilä2009-10-214-4/+36
| | | | | | | | | | | | | | | | | | | | 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
* | Use premultiplied alpha pixel format in SymbianShane Kearns2009-10-201-4/+3
| | | | | | | | | | | | | | | | | | Gives better performance in the raster paint engine. For Symbian 9.3 onwards, this can also be used as the native pixmap format. For 9.2, conversion is required. Reviewed-by: Sami Merila Reviewed-by: Jani Hautakangas
* | QT-693 QS60Style does not regard selection beahviors with itemviewsSami Merilä2009-10-201-2/+22
| | | | | | | | | | | | | | | | | | | | | | QS60Style disregards all selection behaviors for itemviews. This leads to error when showing a highlighted selection rect; rect is only shown for cell having focus. Fixed by setting the highlight to all 'selected' cells. Task-number: QT-693 Reviewed-by: Alessandro Portale
* | qwindowsmobilestyle.cpp: endif comment fixedJoerg Bornemann2009-10-191-1/+1
| |
* | Fixed getting an icon for a file on the filesystem with gnome.Denis Dzyubenko2009-10-091-3/+6
| | | | | | | | | | | | | | | | | | | | According to the documentation gnome_icon_lookup_sync() can return an absolute file path for the icon, so we check if the returned string starts like a path, then we load the icon from the file. This also fixes compilation warnings. Reviewed-by: Olivier Goffart
* | Color role with higher contrast for focusrectAlessandro Portale2009-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Low-risk, high value change. Beta worthy! As much as QPalette::Highlight sounds like a suitable color role for drawing a focus rect... It simply did not work well with a lot of S60 themes (e.g. the default N95 theme). QPalette::Text is a better candidate, since the S60 themes promise a good contrast of text on background graphics. Reviewed-By: Sami Merilä
* | QS60Style: Re-enable color-from-skin-part extractionAlessandro Portale2009-10-081-5/+4
| | | | | | | | | | | | | | | | | | | | | | After introducing native pixmap support, we had some crashes on certain setups (e.g. 3.2 Emulator) when accessing data that came from native pixmaps (FBServ). However, after fix 064674426ef0c446561b0c338441bb7d5ca091bf this is not reproducable, anymore. Therefore let's re-enable color extraction and enjoy better color palettes. Reviewed-By: Sami Merilä
* | Merge branch '4.5' into 4.6Thiago Macieira2009-10-081-1/+1
|\ \ | |/ | | | | | | Conflicts: src/gui/itemviews/qheaderview.cpp
| * Fix ASSERT caused by Plastique style when setting an application font with a ↵Bradley T. Hughes2009-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | pixel size Use QFontInfo to query the pointSize() instead of asking the font directly, fixing this assert: ASSERT failure in QFont::setPointSize: "point size must be greater than 0", file text/qfont.cpp, line 855 Task-number: QTBUG-3555 Reviewed-by: Simon Hausmann
* | Let the platform plugin decide on the click policy on itemviewOlivier Goffart2009-10-081-1/+1
| | | | | | | | Reviewed-by: Jens Bache-Wiig
* | Integrate the GuiPlatformPlugin interfaceOlivier Goffart2009-10-072-51/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an internal interface for plugins that can be provided by the platform to give platform-specific features by platforms built on top of Qt. We can easlily integrate Qt on Windows, Mac, Gnome, ... without any plugin because we can link to their respective library (dynamically if we don't want to depend on it). On Gnome, we can dynamically resolve Gtk+ symbols. This is however not possible for KDE or other platform built on top of Qt: we can't link against their library because they depend on us and we can't dynamically resolve the symbols because they are mangled (C++) So this plugin provides hooks inside Qt to be able to do things like native File or Color dialog, native icons, accurate reading of the config file, and so on. This is currently private API. Task-number: QT-406 Reviewed-by: Jens Bache-Wiig Reviewed-by: Oswald Buddenhagen
* | Better compile fix.Alexis Menard2009-10-061-1/+1
| | | | | | | | Reviewed-by:Thiago
* | Build fix.Alexis Menard2009-10-061-1/+1
| |
* | Add GNOME implementation for native filesystem iconsJens Bache-Wiig2009-10-062-0/+57
| | | | | | | | | | | | | | | | | | | | | | This adds some code to support native filesystem icons on GNOME. It works by resolving gnome libs and gnome-vfs dynamically, hence we are explicitly running it on GNOME only and not KDE. Even if it would work there as well. We are planning on adding this functionality to the platform plugin as well. Task-number: QTBUG-2195 Reviewed-by: joao
* | Renamed the values in the Qt::TileRule enum.Trond Kjernåsen2009-10-021-1/+1
| | | | | | | | | | | | | | Stretch, Repeat and Round are too generic. Renamed to StretchTile, RepeatTile and RoundTile. Reviewed-by: Gunnar