summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/styles/qs60style.cpp101
-rw-r--r--src/gui/styles/qs60style_p.h17
-rw-r--r--src/gui/styles/qs60style_symbian.cpp82
3 files changed, 141 insertions, 59 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index f3a5d97..5e05dd4 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -109,6 +109,7 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme
{SE_ToolBarButton, QS60StyleEnums::SP_QsnFrSctrlButtonCenter},
{SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed},
{SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter},
+ {SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive},
};
static const int frameElementsCount =
int(sizeof(QS60StylePrivate::m_frameElementsData)/sizeof(QS60StylePrivate::m_frameElementsData[0]));
@@ -335,6 +336,9 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
drawRow(QS60StyleEnums::SP_QsnCpScrollHandleTopPressed, QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed,
QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed, Qt::Vertical, painter, rect, flags | SF_PointNorth);
break;
+ case SE_ButtonInactive:
+ drawFrame(SF_ButtonInactive, painter, rect, flags | SF_PointNorth);
+ break;
default:
break;
}
@@ -562,7 +566,7 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) const
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0));
const QStyleOption opt;
widgetPalette.setColor(QPalette::Disabled, QPalette::ButtonText,
- QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, &opt));
+ QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, &opt));
QApplication::setPalette(widgetPalette, "QPushButton");
} else if (qobject_cast<QToolButton *>(widget)){
const QFont suggestedFont = s60Font(
@@ -601,7 +605,7 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) const
QS60StyleEnums::FC_Title, widget->font().pointSizeF());
widget->setFont(suggestedFont);
} else if (qobject_cast<QLineEdit *>(widget)) {
- widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
+ widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
QApplication::setPalette(widgetPalette, "QLineEdit");
} else if (qobject_cast<QDial *> (widget)) {
@@ -826,18 +830,18 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
const QS60StylePrivate::SkinElements grooveElement =
horizontal ? QS60StylePrivate::SE_ScrollBarGrooveHorizontal : QS60StylePrivate::SE_ScrollBarGrooveVertical;
QS60StylePrivate::drawSkinElement(grooveElement, painter, grooveRect, flags);
-
- QStyle::SubControls subControls = optionSlider->subControls;
-
+
+ QStyle::SubControls subControls = optionSlider->subControls;
+
// select correct slider (horizontal/vertical/pressed)
const bool sliderPressed = ((optionSlider->state & QStyle::State_Sunken) && (subControls & SC_ScrollBarSlider));
const QS60StylePrivate::SkinElements handleElement =
- horizontal ?
- ( sliderPressed ?
- QS60StylePrivate::SE_ScrollBarHandlePressedHorizontal :
- QS60StylePrivate::SE_ScrollBarHandleHorizontal ) :
- ( sliderPressed ?
- QS60StylePrivate::SE_ScrollBarHandlePressedVertical :
+ horizontal ?
+ ( sliderPressed ?
+ QS60StylePrivate::SE_ScrollBarHandlePressedHorizontal :
+ QS60StylePrivate::SE_ScrollBarHandleHorizontal ) :
+ ( sliderPressed ?
+ QS60StylePrivate::SE_ScrollBarHandlePressedVertical :
QS60StylePrivate::SE_ScrollBarHandleVertical);
QS60StylePrivate::drawSkinElement(handleElement, painter, scrollBarSlider, flags);
}
@@ -901,7 +905,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
if (sub & SC_ComboBoxArrow) {
// Draw the little arrow
- buttonOption.rect.adjust(1, 1, -1, -1);
+ buttonOption.rect.adjust(1, 1, -1, -1);
painter->save();
painter->setPen(option->palette.buttonText().color());
drawPrimitive(PE_IndicatorSpinDown, &buttonOption, painter, widget);
@@ -1206,17 +1210,30 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
break;
case CE_PushButtonBevel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
- const bool isPressed = option->state & QStyle::State_Sunken;
- if (button->features & QStyleOptionButton::Flat) {
- const QS60StyleEnums::SkinParts skinPart =
- isPressed ? QS60StyleEnums::SP_QsnFrButtonTbCenterPressed : QS60StyleEnums::SP_QsnFrButtonTbCenter;
- QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+ const bool isDisabled = !(option->state & QStyle::State_Enabled);
+ const bool isFlat = button->features & QStyleOptionButton::Flat;
+ QS60StyleEnums::SkinParts skinPart;
+ QS60StylePrivate::SkinElements skinElement;
+ if (!isDisabled) {
+ const bool isPressed = option->state & QStyle::State_Sunken;
+ if (isFlat) {
+ skinPart =
+ isPressed ? QS60StyleEnums::SP_QsnFrButtonTbCenterPressed : QS60StyleEnums::SP_QsnFrButtonTbCenter;
+ } else {
+ skinElement =
+ isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal;
+ }
} else {
- const QS60StylePrivate::SkinElements skinElement =
- isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal;
+ if (isFlat)
+ skinPart =QS60StyleEnums::SP_QsnFrButtonCenterInactive;
+ else
+ skinElement = QS60StylePrivate::SE_ButtonInactive;
+ }
+ if (isFlat)
+ QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+ else
QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags);
}
- }
break;
case CE_PushButtonLabel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
@@ -1248,13 +1265,13 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_ToolButtonLabel:
if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
QStyleOptionToolButton optionToolButton = *toolBtn;
-
- if (!optionToolButton.icon.isNull() && (optionToolButton.state & QStyle::State_Sunken)
+
+ if (!optionToolButton.icon.isNull() && (optionToolButton.state & QStyle::State_Sunken)
&& (optionToolButton.state & State_Enabled)) {
-
+
const QIcon::State state = optionToolButton.state & State_On ? QIcon::On : QIcon::Off;
const QPixmap pm(optionToolButton.icon.pixmap(optionToolButton.rect.size().boundedTo(optionToolButton.iconSize),
- QIcon::Normal, state));
+ QIcon::Normal, state));
optionToolButton.icon = generatedIconPixmap(QIcon::Selected, pm, &optionToolButton);
}
@@ -1940,7 +1957,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
} else if (option->state & QStyle::State_Selected) {
QRect tickRect = option->rect;
const int frameBorderWidth = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth);
- // adjust tickmark rect to exclude frame border
+ // adjust tickmark rect to exclude frame border
tickRect.adjust(0,-frameBorderWidth,0,-frameBorderWidth);
QS60StyleEnums::SkinParts skinPart = QS60StyleEnums::SP_QgnIndiMarkedAdd;
QS60StylePrivate::drawSkinPart(skinPart, painter, tickRect,
@@ -1996,7 +2013,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowRight;
else if (element==PE_IndicatorArrowUp)
skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowUp;
-
+
QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
}
break;
@@ -2006,11 +2023,11 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
case PE_IndicatorSpinUp:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
QStyleOptionSpinBox optionSpinBox = *spinBox;
- const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ?
- QS60StyleEnums::SP_QgnGrafScrollArrowUp :
+ const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ?
+ QS60StyleEnums::SP_QgnGrafScrollArrowUp :
QS60StyleEnums::SP_QgnGrafScrollArrowDown;
const int adjustment = qMin(optionSpinBox.rect.width(), optionSpinBox.rect.height())/6;
- optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
+ optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
QS60StylePrivate::drawSkinPart(part, painter, optionSpinBox.rect,flags);
}
#ifndef QT_NO_COMBOBOX
@@ -2019,11 +2036,11 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
const QS60StyleEnums::SkinParts part = QS60StyleEnums::SP_QgnGrafScrollArrowDown;
QStyleOptionFrame comboBox = *cmb;
const int adjustment = qMin(comboBox.rect.width(), comboBox.rect.height())/6;
- comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
+ comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
QS60StylePrivate::drawSkinPart(part, painter, comboBox.rect,flags);
}
#endif //QT_NO_COMBOBOX
- break;
+ break;
case PE_IndicatorSpinMinus:
case PE_IndicatorSpinPlus:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
@@ -2170,25 +2187,25 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect,
(flags | QS60StylePrivate::SF_ColorSkinned));
}
-
+
if (option->state & State_Children) {
- QS60StyleEnums::SkinParts skinPart =
- (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
+ QS60StyleEnums::SkinParts skinPart =
+ (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
int minDimension = qMin(option->rect.width(), option->rect.height());
const int resizeValue = minDimension >> 1;
minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension));
int verticalMagic(0);
// magic values for positioning svg icon.
- if (option->rect.width() <= option->rect.height())
- verticalMagic = 3;
+ if (option->rect.width() <= option->rect.height())
+ verticalMagic = 3;
iconRect.translate(3, verticalMagic - resizeValue);
- QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
- }
+ QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
+ }
+ }
}
- }
- break;
-
+ break;
+
// todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases
case PE_FrameLineEdit:
case PE_IndicatorButtonDropDown:
@@ -2256,7 +2273,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_PushButton:
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget)))
- if (buttonWidget->isCheckable())
+ if (buttonWidget->isCheckable())
sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0);
break;
case CT_LineEdit:
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index fc6bcd6..cf850c6 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -113,7 +113,7 @@ public:
SP_QgnPropFolderCurrent,
SP_QgnPropFolderSmall,
SP_QgnPropFolderSmallNew,
- SP_QgnPropPhoneMemcLarge,
+ SP_QgnPropPhoneMemcLarge,
SP_QsnCpScrollHandleBottomPressed, //ScrollBar handle, pressed state
SP_QsnCpScrollHandleMiddlePressed,
SP_QsnCpScrollHandleTopPressed,
@@ -231,7 +231,16 @@ public:
SP_QsnFrSctrlButtonSideBPressed,
SP_QsnFrSctrlButtonSideLPressed,
SP_QsnFrSctrlButtonSideRPressed,
- SP_QsnFrSctrlButtonCenterPressed
+ SP_QsnFrSctrlButtonCenterPressed,
+ SP_QsnFrButtonCornerTlInactive, // Inactive button
+ SP_QsnFrButtonCornerTrInactive,
+ SP_QsnFrButtonCornerBlInactive,
+ SP_QsnFrButtonCornerBrInactive,
+ SP_QsnFrButtonSideTInactive,
+ SP_QsnFrButtonSideBInactive,
+ SP_QsnFrButtonSideLInactive,
+ SP_QsnFrButtonSideRInactive,
+ SP_QsnFrButtonCenterInactive
};
enum ColorLists {
@@ -292,6 +301,7 @@ public:
SE_PanelBackground,
SE_ScrollBarHandlePressedHorizontal, //only for 5.0+
SE_ScrollBarHandlePressedVertical,
+ SE_ButtonInactive,
};
enum SkinFrameElements {
@@ -307,7 +317,8 @@ public:
SF_ToolBar,
SF_ToolBarButton,
SF_ToolBarButtonPressed,
- SF_PanelBackground
+ SF_PanelBackground,
+ SF_ButtonInactive,
};
enum SkinElementFlag {
diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp
index 0b5e2d9..025ef93 100644
--- a/src/gui/styles/qs60style_symbian.cpp
+++ b/src/gui/styles/qs60style_symbian.cpp
@@ -80,6 +80,8 @@ public:
const QSize &size, QS60StylePrivate::SkinElementFlags flags);
static QColor colorValue(const TAknsItemID &colorGroup, int colorIndex);
static QPixmap fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, QImage::Format format);
+ static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part);
+ static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame);
static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags);
private:
@@ -283,7 +285,19 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2626},
/* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2627},
/* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2628},
- /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2629}
+ /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2629},
+
+ // No inactive button graphics in 3.1/3.2
+ /* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/
+ /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b2},
+ /* SP_QsnFrButtonCornerBlInactive */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b3},
+ /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b4},
+ /* SP_QsnFrButtonSideTInactive */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b5},
+ /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b6},
+ /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b7},
+ /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8},
+ /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon,ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}
+
};
QPixmap QS60StyleModeSpecifics::skinnedGraphics(
@@ -323,7 +337,7 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphics(
}
void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &stylepart, TDes& fallbackFileName, TInt& fallbackIndex)
-{
+{
switch(stylepart) {
case QS60StyleEnums::SP_QgnGrafBarWait:
fallbackFileName = KAvkonBitmapFile();
@@ -377,19 +391,19 @@ void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &style
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = EMbmAvkonQgn_indi_checkbox_on;
break;
- case QS60StyleEnums::SP_QgnIndiHlColSuper:
+ case QS60StyleEnums::SP_QgnIndiHlColSuper:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x4456; /* EMbmAvkonQgn_indi_hl_col_super */
break;
- case QS60StyleEnums::SP_QgnIndiHlExpSuper:
+ case QS60StyleEnums::SP_QgnIndiHlExpSuper:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x4458; /* EMbmAvkonQgn_indi_hl_exp_super */
break;
- case QS60StyleEnums::SP_QgnIndiHlLineBranch:
+ case QS60StyleEnums::SP_QgnIndiHlLineBranch:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x445A; /* EMbmAvkonQgn_indi_hl_line_branch */
break;
- case QS60StyleEnums::SP_QgnIndiHlLineEnd:
+ case QS60StyleEnums::SP_QgnIndiHlLineEnd:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x445C; /* EMbmAvkonQgn_indi_hl_line_end */
break;
@@ -486,8 +500,8 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsL(
TInt fallbackGraphicID = -1;
HBufC* iconFile = HBufC::NewLC( KMaxFileName );
TPtr fileNamePtr = iconFile->Des();
- fallbackInfo(stylepart, fileNamePtr, fallbackGraphicID);
-
+ fallbackInfo(stylepart, fileNamePtr, fallbackGraphicID);
+
TAknsItemID colorGroup = KAknsIIDQsnIconColors;
int colorIndex = 0;
colorGroupAndIndex(stylepart, colorGroup, colorIndex);
@@ -991,6 +1005,46 @@ short QS60StylePrivate::pixelMetric(int metric)
#endif // QT_S60STYLE_LAYOUTDATA_SIMULATED
}
+bool QS60StyleModeSpecifics::disabledPartGraphic(QS60StyleEnums::SkinParts &part)
+{
+ bool disabledGraphic = false;
+ switch(part){
+ // inactive button graphics are available from 5.0 onwards
+ case QS60StyleEnums::SP_QsnFrButtonCornerTlInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerTrInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerBlInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerBrInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideTInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideBInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideLInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideRInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCenterInactive:
+ if (!(QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 ||
+ QSysInfo::s60Version()==QSysInfo::SV_S60_3_2))
+ disabledGraphic = true;
+ break;
+ default:
+ break;
+ }
+ return disabledGraphic;
+}
+
+bool QS60StyleModeSpecifics::disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame)
+{
+ bool disabledGraphic = false;
+ switch(frame){
+ // inactive button graphics are available from 5.0 onwards
+ case QS60StylePrivate::SF_ButtonInactive:
+ if (!(QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 ||
+ QSysInfo::s60Version()==QSysInfo::SV_S60_3_2))
+ disabledGraphic = true;
+ break;
+ default:
+ break;
+ }
+ return disabledGraphic;
+}
+
QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part,
const QSize &size, QS60StylePrivate::SkinElementFlags flags)
{
@@ -1002,8 +1056,8 @@ QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::Skin
// AVKON UI has a abnormal handling for scrollbar graphics. It is possible that the root
// skin does not contain mandatory graphics for scrollbar pressed states. Therefore, AVKON UI
// creates dynamically these graphics by modifying the normal state scrollbar graphics slightly.
- // S60Style needs to work similarly. Therefore if skingraphics call provides to be a miss
- // (i.e. result is not valid), style needs to draw normal graphics instead and apply some
+ // S60Style needs to work similarly. Therefore if skingraphics call provides to be a miss
+ // (i.e. result is not valid), style needs to draw normal graphics instead and apply some
// modifications (similar to generatedIconPixmap()) to the result.
case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
updatedPart = QS60StyleEnums::SP_QsnCpScrollHandleBottom;
@@ -1024,7 +1078,7 @@ QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::Skin
// TODO: fix this
QStyleOption opt;
// opt.palette = q->standardPalette();
-
+
// For now, always generate new icon based on "selected". In the future possibly, expand
// this to consist other possibilities as well.
result = QApplication::style()->generatedIconPixmap(QIcon::Selected, result, &opt);
@@ -1041,7 +1095,7 @@ QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part,
: QS60StyleModeSpecifics::skinnedGraphics(part, size, flags);
QS60WindowSurface::lockBitmapHeap();
- if (flags & SF_StateDisabled) {
+ if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledPartGraphic(part)) {
// TODO: fix this
QStyleOption opt;
// opt.palette = q->standardPalette();
@@ -1050,7 +1104,7 @@ QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part,
if (!result)
result = QS60StyleModeSpecifics::generateMissingThemeGraphic(part, size, flags);
-
+
return result;
}
@@ -1060,7 +1114,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, Skin
QPixmap result = QS60StyleModeSpecifics::skinnedGraphics(frame, size, flags);
QS60WindowSurface::lockBitmapHeap();
- if (flags & SF_StateDisabled) {
+ if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledFrameGraphic(frame)) {
// TODO: fix this
QStyleOption opt;
// opt.palette = q->standardPalette();