diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-19 13:55:10 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-19 13:55:10 (GMT) |
commit | f540574b44aa874af22ce8b15598b854f28517d7 (patch) | |
tree | 6e7b375107fdfeee54516ebc0cd52837a32035eb /src/gui/styles | |
parent | 364ce5b7f5379499562b4f4f5a68da7ba068fe1e (diff) | |
parent | 8485052e3991aebf7c823b3e80fc06ccf9f08991 (diff) | |
download | Qt-f540574b44aa874af22ce8b15598b854f28517d7.zip Qt-f540574b44aa874af22ce8b15598b854f28517d7.tar.gz Qt-f540574b44aa874af22ce8b15598b854f28517d7.tar.bz2 |
Merge branch 'master-upstream'
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcleanlooksstyle.cpp | 43 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 98 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 2 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 31 | ||||
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 5 | ||||
-rw-r--r-- | src/gui/styles/qstylehelper_p.h | 1 |
6 files changed, 83 insertions, 97 deletions
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 8a2a88b..cc5fe10 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -68,9 +68,6 @@ #include <qlibrary.h> #include <private/qstylehelper_p.h> -#define CL_MAX(a,b) (a)>(b) ? (a):(b) // ### qMin/qMax does not work for vc6 -#define CL_MIN(a,b) (a)<(b) ? (a):(b) // remove this when it is working - QT_BEGIN_NAMESPACE using namespace QStyleHelper; @@ -533,8 +530,8 @@ static void qt_cleanlooks_draw_mdibutton(QPainter *painter, const QStyleOptionTi { QColor dark; dark.setHsv(option->palette.button().color().hue(), - CL_MIN(255, (int)(option->palette.button().color().saturation()*1.9)), - CL_MIN(255, (int)(option->palette.button().color().value()*0.7))); + qMin(255, (int)(option->palette.button().color().saturation()*1.9)), + qMin(255, (int)(option->palette.button().color().value()*0.7))); QColor highlight = option->palette.highlight().color(); @@ -691,11 +688,11 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, QColor darkOutline; QColor dark; darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*3.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); QColor tabFrameColor = mergedColors(option->palette.background().color(), dark.lighter(135), 60); @@ -1117,8 +1114,8 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, QColor gradientMidColor = option->palette.button().color(); QColor gradientStopColor; gradientStopColor.setHsv(buttonColor.hue(), - CL_MIN(255, (int)(buttonColor.saturation()*1.9)), - CL_MIN(255, (int)(buttonColor.value()*0.96))); + qMin(255, (int)(buttonColor.saturation()*1.9)), + qMin(255, (int)(buttonColor.value()*0.96))); QRect gradRect = rect.adjusted(1, 2, -1, -2); // gradient fill @@ -1384,12 +1381,12 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o QColor button = option->palette.button().color(); QColor dark; dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); QColor darkOutline; darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*2.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*2.0)), + qMin(255, (int)(button.value()*0.6))); QRect rect = option->rect; QColor shadow = mergedColors(option->palette.background().color().darker(120), dark.lighter(130), 60); @@ -1662,8 +1659,8 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o QColor gradientStopColor; QColor gradientStartColor = option->palette.button().color(); gradientStopColor.setHsv(gradientStartColor.hue(), - CL_MIN(255, (int)(gradientStartColor.saturation()*2)), - CL_MIN(255, (int)(gradientStartColor.value()*0.96))); + qMin(255, (int)(gradientStartColor.saturation()*2)), + qMin(255, (int)(gradientStartColor.value()*0.96))); QLinearGradient gradient(rect.topLeft(), rect.bottomLeft()); if (option->palette.background().gradient()) { gradient.setStops(option->palette.background().gradient()->stops()); @@ -2425,14 +2422,14 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp QColor grooveColor; QColor darkOutline; dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); grooveColor.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*2.6)), - CL_MIN(255, (int)(button.value()*0.9))); + qMin(255, (int)(button.saturation()*2.6)), + qMin(255, (int)(button.value()*0.9))); darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*3.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); QColor alphaCornerColor; if (widget) { diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 7a89478..680e007 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -77,14 +77,12 @@ #include "private/qcombobox_p.h" #include "private/qwidget_p.h" #include "private/qapplication_p.h" +#include "private/qfont_p.h" #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN) QT_BEGIN_NAMESPACE -// from text/qfont.cpp -extern Q_GUI_EXPORT int qt_defaultDpiY(); - const QS60StylePrivate::SkinElementFlags QS60StylePrivate::KDefaultSkinElementFlags = SkinElementFlags(SF_PointNorth | SF_StateEnabled); @@ -107,8 +105,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** {5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106}, {5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, -{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,11,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,13,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106}, {9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184} // *** End of generated data *** @@ -1743,16 +1741,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QStyleOptionMenuItem optionMenuItem = *menuItem; bool drawSubMenuIndicator = false; + bool drawSeparator = false; switch(menuItem->menuItemType) { - case QStyleOptionMenuItem::Scroller: case QStyleOptionMenuItem::Separator: - return; // no separators or scrollers in S60 menus + drawSeparator = true; + break; + case QStyleOptionMenuItem::Scroller: + return; // no scrollers in S60 menus case QStyleOptionMenuItem::SubMenu: drawSubMenuIndicator = true; break; default: break; } + if (drawSeparator) { + painter->save(); + painter->setPen(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 10, 0)); + painter->drawLine(optionMenuItem.rect.topLeft(), optionMenuItem.rect.bottomRight()); + painter->restore(); + return; + } const bool enabled = optionMenuItem.state & State_Enabled; const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable; bool ignoreCheckMark = false; @@ -1856,20 +1864,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, //In Sym^3, native menu items have "lines" between them if (QS60StylePrivate::isSingleClickUi()) { - const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0); - const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth); - //native platform sets each color byte to same value for "line 16" which just defines alpha for - //menuitem lines; lets use first byte "red". - QColor lineColor = optionMenuItem.palette.text().color(); - if (lineColorAlpha.isValid()) - lineColor.setAlpha(lineColorAlpha.red()); - painter->save(); - painter->setPen(lineColor); - - const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing; - const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing; - painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom())); - painter->restore(); + int diff = widget->geometry().bottom() - optionMenuItem.rect.bottom(); + if (const QComboBox *cb = qobject_cast<const QComboBox*>(widget)) + diff = cb->view()->geometry().bottom() - optionMenuItem.rect.bottom(); + + // Skip drawing the horizontal line for the last menu item. + if (diff > optionMenuItem.rect.height()) { + const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0); + //native platform sets each color byte to same value for "line 16" which just defines alpha for + //menuitem lines; lets use first byte "red". + QColor lineColor = optionMenuItem.palette.text().color(); + if (lineColorAlpha.isValid()) + lineColor.setAlpha(lineColorAlpha.red()); + painter->save(); + painter->setPen(lineColor); + const int horizontalMargin = 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); + const int lineStartX = optionMenuItem.rect.left() + horizontalMargin; + const int lineEndX = optionMenuItem.rect.right() - horizontalMargin; + painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom())); + painter->restore(); + } } if (!enabled) painter->restore(); @@ -2264,13 +2278,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_MENU ) { //Need extra check since dialogs have their own theme background - if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) && - QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) - //todo: for combobox listviews, the background should include area for menu scrollers, - //but this produces drawing issues as we need to turn clipping off. - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags); - else + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) + && QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) { + const bool comboMenu = qobject_cast<const QComboBoxListView *>(widget); + // Add margin area to the background, to avoid background being cut for first and last item. + const int verticalMenuAdjustment = comboMenu ? QS60StylePrivate::pixelMetric(PM_MenuVMargin) : 0; + const QRect adjustedMenuRect = option->rect.adjusted(0, -verticalMenuAdjustment, 0, verticalMenuAdjustment); + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags); + } else { commonStyleDraws = true; + } } break; case PE_FrameWindow: @@ -2538,17 +2555,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal; if (parentCanGrowHorizontally) { - int visibleButtons = 0; + int buttons = 0; //Make the auto-stretch to happen only for horizontal orientation if (tb && tb->orientation() == Qt::Horizontal) { QList<QAction*> actionList = tb->actions(); for (int i = 0; i < actionList.count(); i++) { - if (actionList.at(i)->isVisible()) - visibleButtons++; + buttons++; } } - if (widget->parentWidget() && visibleButtons > 0) { + if (widget->parentWidget() && buttons > 0) { QWidget *w = const_cast<QWidget *>(widget); int toolBarMaxWidth = 0; int totalMargin = 0; @@ -2571,7 +2587,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, toolBarMaxWidth -= totalMargin; //ensure that buttons are side-by-side and not on top of each other - const int toolButtonWidth = (toolBarMaxWidth / visibleButtons) + const int toolButtonWidth = (toolBarMaxWidth / buttons) - pixelMetric(QStyle::PM_ToolBarItemSpacing) - pixelMetric(QStyle::PM_ToolBarItemMargin) //toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action @@ -2604,10 +2620,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, sz += QSize(2 * f->lineWidth, 4 * f->lineWidth); break; case CT_TabBarTab: { - const QSize naviPaneSize = QS60StylePrivate::naviPaneSize(); sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget); - if (naviPaneSize.height() > sz.height()) - sz.setHeight(naviPaneSize.height()); // Adjust beginning tabbar item size, if scrollbuttons are used. This is to ensure that the // tabbar item content fits, since scrollbuttons are making beginning tabbar item smaller. int scrollButtonSize = 0; @@ -2627,7 +2640,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, case CT_ItemViewItem: if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) { if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - sz = QSize(); + sz = QSize(menuItem->rect.width() - 2 * pixelMetric(PM_MenuHMargin) - 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth), 1); break; } } @@ -3353,9 +3366,9 @@ bool QS60Style::event(QEvent *e) QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const { - const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize); - const QRect iconSize = (!option) ? QRect(0, 0, iconDimension, iconDimension) : option->rect; QS60StyleEnums::SkinParts part; + qreal iconHeightMultiplier = 1.0; + qreal iconWidthMultiplier = 1.0; QS60StylePrivate::SkinElementFlags adjustedFlags; if (option) adjustedFlags = (option->state & State_Enabled || option->state == 0) ? @@ -3364,15 +3377,20 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, switch(standardIcon) { case SP_MessageBoxWarning: + // By default, S60 messagebox icons have 4:3 ratio. Value is from S60 LAF documentation. + iconHeightMultiplier = 1.33; part = QS60StyleEnums::SP_QgnNoteWarning; break; case SP_MessageBoxInformation: + iconHeightMultiplier = 1.33; part = QS60StyleEnums::SP_QgnNoteInfo; break; case SP_MessageBoxCritical: + iconHeightMultiplier = 1.33; part = QS60StyleEnums::SP_QgnNoteError; break; case SP_MessageBoxQuestion: + iconHeightMultiplier = 1.33; part = QS60StyleEnums::SP_QgnNoteQuery; break; case SP_ArrowRight: @@ -3427,11 +3445,13 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, adjustedFlags |= QS60StylePrivate::SF_PointEast; part = QS60StyleEnums::SP_QgnIndiSubmenu; break; - default: return QCommonStyle::standardIconImplementation(standardIcon, option, widget); } const QS60StylePrivate::SkinElementFlags flags = adjustedFlags; + const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize); + const QRect iconSize = (!option) ? + QRect(0, 0, iconDimension * iconWidthMultiplier, iconDimension * iconHeightMultiplier) : option->rect; const QPixmap cachedPixMap(QS60StylePrivate::cachedPart(part, iconSize.size(), 0, flags)); return cachedPixMap.isNull() ? QCommonStyle::standardIconImplementation(standardIcon, option, widget) : QIcon(cachedPixMap); diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 3628b27..e146a4e 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -562,8 +562,6 @@ public: void handleSkinChange(); #endif // Q_WS_S60 - static QSize naviPaneSize(); - //Checks that the current brush is transparent or has BrushStyle NoBrush, //so that theme graphic background can be drawn. static bool canDrawThemeBackground(const QBrush &backgroundBrush, const QWidget *widget); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index c5149a3..6b79874 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -158,7 +158,6 @@ public: static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part); static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame); static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags); - static QSize naviPaneSize(); static TAknsItemID partSpecificThemeId(int part); static QVariant themeDefinition(QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part); @@ -777,16 +776,8 @@ QPoint qt_s60_fill_background_offset(const QWidget *targetWidget) { CCoeControl *control = targetWidget->effectiveWinId(); TPoint pos(0,0); - if (control) { - // FIXME properly: S60 3.1 has a bug that CCoeControl::PositionRelativeToScreen sometimes - // freezes the device, possibly in cases where we run out of memory. - // We use CCoeControl::Position instead in S60 3.1, which returns same values - // in most cases. - if (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1) - pos = control->Position(); - else - pos = control->PositionRelativeToScreen(); - } + if (control) + pos = control->PositionRelativeToScreen(); return QPoint(pos.iX, pos.iY); } @@ -1402,6 +1393,7 @@ QPixmap QS60StylePrivate::backgroundTexture(bool skipCreation) if (m_background->width() != applicationRect.Width() || m_background->height() != applicationRect.Height()) { delete m_background; + m_background = 0; createNewBackground = true; } } @@ -1477,23 +1469,6 @@ void QS60StylePrivate::handleSkinChange() #endif } -QSize QS60StylePrivate::naviPaneSize() -{ - return QS60StyleModeSpecifics::naviPaneSize(); -} - -QSize QS60StyleModeSpecifics::naviPaneSize() -{ - CAknNavigationControlContainer* naviContainer; - if (S60->statusPane()) { - TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*> - (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi)))); - if (err==KErrNone) - return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight); - } - return QSize(0,0); -} - int QS60StylePrivate::currentAnimationFrame(QS60StyleEnums::SkinParts part) { QS60StyleAnimation *animation = animationDefinition(part); diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 7223c6b..a5aeac3 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -318,11 +318,6 @@ QPixmap QS60StylePrivate::backgroundTexture(bool /*skipCreation*/) return *m_background; } -QSize QS60StylePrivate::naviPaneSize() -{ - return QSize(0, 0); -} - bool QS60StylePrivate::isTouchSupported() { #ifdef QT_KEYPAD_NAVIGATION diff --git a/src/gui/styles/qstylehelper_p.h b/src/gui/styles/qstylehelper_p.h index 559f7f7..27587e3 100644 --- a/src/gui/styles/qstylehelper_p.h +++ b/src/gui/styles/qstylehelper_p.h @@ -110,6 +110,7 @@ template <typename T> enum { ExactSize = true }; static int size(const HexString<T> &) { return sizeof(T) * 2; } static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); } + typedef QString ConvertTo; }; QT_END_NAMESPACE |