diff options
-rw-r--r-- | src/gui/styles/qs60style.cpp | 43 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 5 | ||||
-rw-r--r-- | src/gui/styles/qs60style_symbian.cpp | 13 |
3 files changed, 60 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 581ada0..388129b 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2075,10 +2075,51 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_PanelMenuBar: case PE_FrameMenu: break; //disable frame in menu + + case PE_IndicatorBranch: + { +#if defined(Q_WS_S60) + if (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1) { +#else + if (true) { +#endif + QCommonStyle::drawPrimitive(element, option, painter, widget); + } else { + if (option->state & State_Children) { + QS60StyleEnums::SkinParts skinPart = + (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper; + const int minDimension = qMin(option->rect.width(), option->rect.height()); + const QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension)); + QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags); + } + const bool rightLine = option->state & State_Item; + const bool downLine = option->state & State_Sibling; + const bool upLine = option->state & (State_Open | State_Children | State_Item | State_Sibling); + + QS60StyleEnums::SkinParts skinPart; + bool drawSkinPart = false; + if (rightLine && downLine && upLine) { + skinPart = QS60StyleEnums::SP_QgnIndiHlLineBranch; + drawSkinPart = true; + } else if (rightLine && upLine) { + skinPart = QS60StyleEnums::SP_QgnIndiHlLineEnd; + drawSkinPart = true; + } else if (upLine && downLine) { + skinPart = QS60StyleEnums::SP_QgnIndiHlLineStraight; + drawSkinPart = true; + } + + if ( drawSkinPart ) { + QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, + (flags | QS60StylePrivate::SF_ColorSkinned)); + } + } + } + break; + // todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases case PE_FrameLineEdit: - case PE_IndicatorBranch: case PE_IndicatorButtonDropDown: case PE_IndicatorDockWidgetResizeHandle: case PE_PanelTipLabel: diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index aafbe00..556352f 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -87,6 +87,11 @@ public: SP_QgnGrafTabPassiveR, SP_QgnIndiCheckboxOff, SP_QgnIndiCheckboxOn, + SP_QgnIndiHlColSuper, // Available in S60 release 3.2 and later. + SP_QgnIndiHlExpSuper, // Available in S60 release 3.2 and later. + SP_QgnIndiHlLineBranch, // Available in S60 release 3.2 and later. + SP_QgnIndiHlLineEnd, // Available in S60 release 3.2 and later. + SP_QgnIndiHlLineStraight, // Available in S60 release 3.2 and later. SP_QgnIndiMarkedAdd, SP_QgnIndiNaviArrowLeft, SP_QgnIndiNaviArrowRight, diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp index 89a0354..b58f8a2 100644 --- a/src/gui/styles/qs60style_symbian.cpp +++ b/src/gui/styles/qs60style_symbian.cpp @@ -102,6 +102,13 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_graf_tab_passive_r ,-1,-1}, /* SP_QgnIndiCheckboxOff */ {KAknsIIDQgnIndiCheckboxOff, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_indi_checkbox_off ,-1,-1}, /* SP_QgnIndiCheckboxOn */ {KAknsIIDQgnIndiCheckboxOn, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_indi_checkbox_on ,-1,-1}, + // Following 5 items (SP_QgnIndiHlColSuper - SP_QgnIndiHlLineStraight) are available starting from S60 release 3.2. + // In 3.1 CommonStyle drawing is used for these QTreeView elements, since no similar icons in AVKON UI. + /* SP_QgnIndiHlColSuper */ {KAknsIIDNone, EDrawIcon, 0, 0x4456 /* EMbmAvkonQgn_indi_hl_col_super */ , EAknsMajorGeneric, 0x17d5 /* KAknsIIDQgnIndiHlColSuper */}, + /* SP_QgnIndiHlExpSuper */ {KAknsIIDNone, EDrawIcon, 0, 0x4458 /* EMbmAvkonQgn_indi_hl_exp_super */ , EAknsMajorGeneric, 0x17d6 /* KAknsIIDQgnIndiHlExpSuper */}, + /* SP_QgnIndiHlLineBranch */ {KAknsIIDNone, EDrawIcon, 0, 0x445A /* EMbmAvkonQgn_indi_hl_line_branch */ , EAknsMajorGeneric, 0x17d7 /* KAknsIIDQgnIndiHlLineBranch */}, + /* SP_QgnIndiHlLineEnd */ {KAknsIIDNone, EDrawIcon, 0, 0x445C /* EMbmAvkonQgn_indi_hl_line_end */ , EAknsMajorGeneric, 0x17d8 /* KAknsIIDQgnIndiHlLineEnd */}, + /* SP_QgnIndiHlLineStraight */ {KAknsIIDNone, EDrawIcon, 0, 0x445E /* EMbmAvkonQgn_indi_hl_line_straight */ , EAknsMajorGeneric, 0x17d9 /* KAknsIIDQgnIndiHlLineStraight */}, /* SP_QgnIndiMarkedAdd */ {KAknsIIDQgnIndiMarkedAdd, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_indi_marked_add ,-1,-1}, /* SP_QgnIndiNaviArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_indi_navi_arrow_left ,-1,-1}, /* SP_QgnIndiNaviArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawIcon, ES60_AllReleases, EMbmAvkonQgn_indi_navi_arrow_right ,-1,-1}, @@ -994,6 +1001,12 @@ void QS60StyleModeSpecifics::colorGroupAndIndex( QS60StyleEnums::SkinParts skinID, TAknsItemID &colorGroup, int colorIndex) { switch(skinID) { + case QS60StyleEnums::SP_QgnIndiSubMenu: + case QS60StyleEnums::SP_QgnIndiHlColSuper: + case QS60StyleEnums::SP_QgnIndiHlExpSuper: + case QS60StyleEnums::SP_QgnIndiHlLineBranch: + case QS60StyleEnums::SP_QgnIndiHlLineEnd: + case QS60StyleEnums::SP_QgnIndiHlLineStraight: case QS60StyleEnums::SP_QgnIndiRadiobuttOff: case QS60StyleEnums::SP_QgnIndiRadiobuttOn: case QS60StyleEnums::SP_QgnIndiCheckboxOff: |