From 7e4e7f66ab5f799c4a4ac71141b322841d05153a Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 29 Apr 2009 13:45:44 +0300 Subject: Fixed tst_QSslSocket::sslErrors test for Symbian HW. --- tests/auto/qsslsocket/tst_qsslsocket.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index b62d629..8dfbedd 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -509,22 +509,28 @@ void tst_QSslSocket::sslErrors_data() QTest::addColumn("errors"); #if defined(Q_OS_SYMBIAN) - QTest::newRow("aspiriniks.troll.no") << QtNetworkSettings::serverName() << 443 + + QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port443") << QtNetworkSettings::serverName() << 443 << (SslErrorList() << QSslError::SelfSignedCertificate -#if !defined(Q_CC_NOKIAX86) - << QSslError::CertificateNotYetValid -#endif //!defined(Q_CC_NOKIAX86) ); - QTest::newRow("aspiriniks.troll.no") << QtNetworkSettings::serverName() << 993 + QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port993") << QtNetworkSettings::serverName() << 993 << (SslErrorList() << QSslError::HostNameMismatch - << QSslError::SelfSignedCertificate - -#if !defined(Q_CC_NOKIAX86) - << QSslError::CertificateNotYetValid -#endif //!defined(Q_CC_NOKIAX86) - ); + << QSslError::SelfSignedCertificate + ); + // TODO: Should we have QtNetworkSettings::serverName alias + // in order that we could test with different host name + +#else + QTest::newRow("imap.troll.no") << "imap.troll.no" << 993 + << (SslErrorList() + << QSslError::HostNameMismatch + << QSslError::SelfSignedCertificateInChain); + QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993 + << (SslErrorList() + << QSslError::SelfSignedCertificateInChain); + #endif //Q_OS_SYMBIAN } @@ -1039,7 +1045,7 @@ void tst_QSslSocket::wildcard() // returns the CNAME fluke.troll.no for this domain. The web server // responds with the wildcard, and QSslSocket should accept that as a // valid connection. This was broken in 4.3.0. - QSslSocketPtr socket = newSocket();; + QSslSocketPtr socket = newSocket(); socket->addCaCertificates(QLatin1String("certs/aspiriniks.ca.crt")); this->socket = socket; #ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND -- cgit v0.12 From e267231ecdd4f1614da62f620f82b19e1157b0b8 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 29 Apr 2009 15:06:10 +0300 Subject: Basic optimizations to qdrawhelper for RVCT builds: - Force static inline methods to be actually inline - Force ARM code for strategic methods RevBy: axis --- src/gui/painting/qdrawhelper.cpp | 11 +++++ src/gui/painting/qdrawhelper_p.h | 95 ++++++++++++++++++++++++---------------- 2 files changed, 69 insertions(+), 37 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index c11837a..b8babd7 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1499,6 +1499,12 @@ static const uint * QT_FASTCALL fetchConicalGradient(uint *buffer, const Operato +#if defined(Q_CC_RVCT) +// Force ARM code generation for blend methods +# pragma push +# pragma arm +#endif + /* The constant alpha factor describes an alpha factor that gets applied to the result of the composition operation combining it with the destination. @@ -2757,6 +2763,11 @@ static void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int len comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); } +#if defined(Q_CC_RVCT) +// Restore pragma state from previous #pragma arm +# pragma pop +#endif + static void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index de97683..ddda7f7 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE #if defined(Q_CC_RVCT) // RVCT doesn't like static template functions # define Q_STATIC_TEMPLATE_FUNCTION -# define Q_STATIC_INLINE_FUNCTION inline +# define Q_STATIC_INLINE_FUNCTION static __forceinline #else # define Q_STATIC_TEMPLATE_FUNCTION static # define Q_STATIC_INLINE_FUNCTION static inline @@ -300,19 +300,23 @@ struct QSpanData }; -static inline uint BYTE_MUL_RGB16(uint x, uint a) { +Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a) { a += 1; uint t = (((x & 0x07e0)*a) >> 8) & 0x07e0; t |= (((x & 0xf81f)*(a>>2)) >> 6) & 0xf81f; return t; } -static inline uint BYTE_MUL_RGB16_32(uint x, uint a) { +Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32(uint x, uint a) { uint t = (((x & 0xf81f07e0) >> 5)*a) & 0xf81f07e0; t |= (((x & 0x07e0f81f)*a) >> 5) & 0x07e0f81f; return t; } +#if defined(Q_CC_RVCT) +# pragma push +# pragma arm +#endif Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) { uint t = (x & 0xff00ff) * a; t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; @@ -324,8 +328,11 @@ Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) { x |= t; return x; } +#if defined(Q_CC_RVCT) +# pragma pop +#endif -static inline uint PREMUL(uint x) { +Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) { uint a = x >> 24; uint t = (x & 0xff00ff) * a; t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; @@ -390,7 +397,7 @@ public: return qt_colorConvert(data, 0); } - static inline quint32p fromRawData(quint32 v) + Q_STATIC_INLINE_FUNCTION quint32p fromRawData(quint32 v) { quint32p p; p.data = v; @@ -421,7 +428,7 @@ class qrgb565; class qargb8565 { public: - static inline bool hasAlpha() { return true; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } inline qargb8565() {} inline qargb8565(quint32 v); @@ -438,8 +445,8 @@ public: data[1] &= 0xdf; return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 3; } - static inline quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } inline qargb8565 byte_mul(quint8 a) const; inline qargb8565 operator+(qargb8565 v) const; @@ -456,7 +463,7 @@ private: class qrgb565 { public: - static inline bool hasAlpha() { return false; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } qrgb565(int v = 0) : data(v) {} @@ -471,8 +478,8 @@ public: inline quint8 alpha() const { return 0xff; } inline qrgb565 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 3; } - static inline quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } inline qrgb565 byte_mul(quint8 a) const; @@ -647,7 +654,7 @@ class qrgb555; class qargb8555 { public: - static inline bool hasAlpha() { return true; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } qargb8555() {} inline qargb8555(quint32 v); @@ -659,8 +666,8 @@ public: inline quint8 alpha() const { return data[0]; } inline qargb8555 truncedAlpha() { data[0] &= 0xf8; return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 3; } - static inline quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } inline qargb8555 operator+(qargb8555 v) const; inline qargb8555 byte_mul(quint8 a) const; @@ -677,7 +684,7 @@ private: class qrgb555 { public: - static inline bool hasAlpha() { return false; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } inline qrgb555(int v = 0) : data(v) {} @@ -726,8 +733,8 @@ public: inline quint8 alpha() const { return 0xff; } inline qrgb555 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 3; } - static inline quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } inline bool operator==(const qrgb555 &v) const { return v.data == data; } inline bool operator!=(const qrgb555 &v) const { return v.data != data; } @@ -875,7 +882,7 @@ class qrgb666; class qargb6666 { public: - static inline bool hasAlpha() { return true; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } inline qargb6666() {} inline qargb6666(quint32 v) { *this = qargb6666(quint32p(v)); } @@ -887,8 +894,8 @@ public: inline quint8 alpha() const; inline qargb6666 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 2; } - static inline quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 2; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } inline qargb6666 byte_mul(quint8 a) const; inline qargb6666 operator+(qargb6666 v) const; @@ -905,7 +912,7 @@ private: class qrgb666 { public: - static inline bool hasAlpha() { return false; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } inline qrgb666() {} inline qrgb666(quint32 v); @@ -915,8 +922,8 @@ public: inline quint8 alpha() const { return 0xff; } inline qrgb666 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 2; } - static inline quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 2; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } inline qrgb666 operator+(qrgb666 v) const; inline qrgb666 byte_mul(quint8 a) const; @@ -1073,7 +1080,7 @@ quint32 qargb6666::rawValue() const class qrgb888 { public: - static inline bool hasAlpha() { return false; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } inline qrgb888() {} inline qrgb888(quint32 v); @@ -1082,8 +1089,8 @@ public: inline quint8 alpha() const { return 0xff; } inline qrgb888 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return a; } - static inline quint8 ialpha(quint8 a) { return 255 - a; } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return a; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 255 - a; } inline qrgb888 byte_mul(quint8 a) const; inline qrgb888 operator+(qrgb888 v) const; @@ -1262,7 +1269,7 @@ class qrgb444; class qargb4444 { public: - static inline bool hasAlpha() { return true; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } inline qargb4444() {} inline qargb4444(quint32 v) { *this = qargb4444(quint32p(v)); } @@ -1276,8 +1283,8 @@ public: inline quint8 alpha() const { return ((data & 0xf000) >> 8) | ((data & 0xf000) >> 12); } inline qargb4444 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 4; } - static inline quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 4; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } inline qargb4444 byte_mul(quint8 a) const; inline bool operator==(const qargb4444 &v) const { return data == v.data; } @@ -1293,7 +1300,7 @@ private: class qrgb444 { public: - static inline bool hasAlpha() { return false; } + Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } inline qrgb444() {} inline qrgb444(quint32 v); @@ -1305,8 +1312,8 @@ public: inline qrgb444 operator+(qrgb444 v) const; inline quint8 alpha() const { return 0xff; } inline qrgb444 truncedAlpha() { return *this; } - static inline quint8 alpha(quint8 a) { return (a + 1) >> 4; } - static inline quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } + Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 4; } + Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } inline qrgb444 byte_mul(quint8 a) const; inline bool operator==(const qrgb444 &v) const { return data == v.data; } @@ -1767,7 +1774,14 @@ do { \ } \ } while (0) +#if defined(Q_CC_RVCT) +# pragma push +# pragma arm +#endif Q_STATIC_INLINE_FUNCTION int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; } +#if defined(Q_CC_RVCT) +# pragma pop +#endif inline ushort qConvertRgb32To16(uint c) { @@ -1810,7 +1824,7 @@ inline int qBlue565(quint16 rgb) { } #if 1 -static inline uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { +Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; t >>= 8; t &= 0xff00ff; @@ -1821,7 +1835,11 @@ static inline uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { return x; } -static inline uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { +#if defined(Q_CC_RVCT) +# pragma push +# pragma arm +#endif +Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; t &= 0xff00ff; @@ -1832,9 +1850,12 @@ static inline uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { x |= t; return x; } +#if defined(Q_CC_RVCT) +# pragma pop +#endif #else // possible implementation for 64 bit -static inline uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { +Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { ulong t = (((ulong(x)) | ((ulong(x)) << 24)) & 0x00ff00ff00ff00ff) * a; t += (((ulong(y)) | ((ulong(y)) << 24)) & 0x00ff00ff00ff00ff) * b; t >>= 8; @@ -1842,7 +1863,7 @@ static inline uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { return (uint(t)) | (uint(t >> 24)); } -static inline uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { +Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { ulong t = (((ulong(x)) | ((ulong(x)) << 24)) & 0x00ff00ff00ff00ff) * a; t += (((ulong(y)) | ((ulong(y)) << 24)) & 0x00ff00ff00ff00ff) * b; t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080); @@ -1857,7 +1878,7 @@ Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) { return (uint(t)) | (uint(t >> 24)); } -static inline uint PREMUL(uint x) { +Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) { uint a = x >> 24; ulong t = (((ulong(x)) | ((ulong(x)) << 24)) & 0x00ff00ff00ff00ff) * a; t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080); -- cgit v0.12 From 37beda2303649664c71c2cc32292d5b54547032b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Wed, 29 Apr 2009 15:43:28 +0300 Subject: S60Style: Styled QToolBar implementation. --- src/gui/styles/qs60style.cpp | 198 +++++++++++++++++++++++++++------ src/gui/styles/qs60style_p.h | 41 ++++++- src/gui/styles/qs60style_simulated.cpp | 8 +- src/gui/styles/qs60style_symbian.cpp | 52 ++++++++- 4 files changed, 258 insertions(+), 41 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 58dcb98..5747ceb 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -23,6 +23,9 @@ #include "qpushbutton.h" #include "qmenubar.h" #include "qtablewidget.h" +#include "qtoolbar.h" +#include "qtoolbutton.h" +#include "private/qtoolbarextension_p.h" #include "private/qcombobox_p.h" #include "private/qwidget_p.h" #include "qscrollbar.h" @@ -50,16 +53,16 @@ static const QByteArray propertyKeyCurrentlayout = "currentlayout"; #if defined(QT_S60STYLE_LAYOUTDATA_SIMULATED) const layoutHeader QS60StylePrivate::m_layoutHeaders[] = { // *** generated layout data *** -{240,320,1,12,true,QLatin1String("QVGA Landscape Mirrored")}, -{240,320,1,12,false,QLatin1String("QVGA Landscape")}, -{320,240,1,12,true,QLatin1String("QVGA Portrait Mirrored")}, -{320,240,1,12,false,QLatin1String("QVGA Portrait")}, -{360,640,1,12,true,QLatin1String("NHD Landscape Mirrored")}, -{360,640,1,12,false,QLatin1String("NHD Landscape")}, -{640,360,1,12,true,QLatin1String("NHD Portrait Mirrored")}, -{640,360,1,12,false,QLatin1String("NHD Portrait")}, -{352,800,1,9,true,QLatin1String("E90 Landscape Mirrored")}, -{352,800,1,9,false,QLatin1String("E90 Landscape")} +{240,320,1,13,true,QLatin1String("QVGA Landscape Mirrored")}, +{240,320,1,13,false,QLatin1String("QVGA Landscape")}, +{320,240,1,13,true,QLatin1String("QVGA Portrait Mirrored")}, +{320,240,1,13,false,QLatin1String("QVGA Portrait")}, +{360,640,1,13,true,QLatin1String("NHD Landscape Mirrored")}, +{360,640,1,13,false,QLatin1String("NHD Landscape")}, +{640,360,1,13,true,QLatin1String("NHD Portrait Mirrored")}, +{640,360,1,13,false,QLatin1String("NHD Portrait")}, +{352,800,1,12,true,QLatin1String("E90 Landscape Mirrored")}, +{352,800,1,12,false,QLatin1String("E90 Landscape")} // *** End of generated data *** }; const int QS60StylePrivate::m_numberOfLayouts = @@ -67,16 +70,17 @@ const int QS60StylePrivate::m_numberOfLayouts = const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** -{5,0,-909,0,0,1,0,0,-1,8,15,22,15,15,7,198,-909,-909,-909,19,15,2,0,0,21,-909,21,-909,4,4,1,-909,-909,0,2,0,0,13,23,17,17,21,21,2,115,21,0,-909,-909,-909,-909,0,0,15,4,-909,0,0,-909,-909,-909,-909,-909,-909,37,21,51,27,51,4,4,5,3,15,-909,5,58,12,5,0,7,4,4,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,15,22,15,15,7,198,-909,-909,-909,19,15,2,0,0,21,-909,21,-909,4,4,1,-909,-909,0,2,0,0,13,23,17,17,21,21,2,115,21,0,-909,-909,-909,-909,0,0,15,5,-909,0,0,-909,-909,-909,-909,-909,-909,37,21,51,27,51,4,4,5,3,15,-909,5,58,12,5,0,4,4,7,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,-909,27,-909,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,4,-909,0,0,-909,-909,-909,-909,-909,-909,37,21,65,27,65,4,4,5,3,15,-909,5,58,13,5,0,7,4,4,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,-909,27,-909,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,5,-909,0,0,-909,-909,-909,-909,-909,-909,37,21,65,27,65,4,4,5,3,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, -{7,0,-909,0,0,2,0,0,-1,20,53,28,19,19,9,258,-909,-909,-909,29,19,26,0,0,32,-909,72,-909,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,5,-909,0,0,-909,-909,-909,-909,-909,-909,87,27,77,35,77,5,5,6,3,19,-909,7,74,19,7,0,8,5,5,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,20,53,28,19,19,9,258,-909,-909,-909,29,19,26,0,0,32,-909,72,-909,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,7,-909,0,0,-909,-909,-909,-909,-909,-909,87,27,77,35,77,5,5,6,3,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,20,52,28,19,19,9,258,-909,-909,-909,29,19,6,0,0,32,-909,60,-909,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,5,-909,0,0,-909,-909,-909,-909,-909,-909,87,27,98,35,98,5,5,6,3,19,-909,7,74,22,7,0,8,5,5,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,20,52,28,19,19,9,258,-909,-909,-909,29,19,6,0,0,32,-909,60,-909,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,7,-909,0,0,-909,-909,-909,-909,-909,-909,87,27,98,35,98,5,5,6,3,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,-909,32,-909,5,5,2,-909,-909,0,2,8,0,16,16,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,5,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,34,7,0,2,2,3,0,1,1,-909,2,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,-909,32,-909,5,5,2,-909,-909,0,2,8,0,16,16,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,34,7,0,3,2,2,0,1,1,-909,2,-909,-909,-909,-909,7,7,3,1} +{5,0,-909,0,0,1,0,0,-1,8,15,22,15,15,7,198,-909,-909,-909,19,15,2,0,0,21,-909,21,-909,4,4,1,-909,-909,0,2,0,0,13,23,17,17,21,21,2,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,51,27,51,4,4,5,3,15,-909,5,58,12,5,0,7,4,4,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,15,22,15,15,7,198,-909,-909,-909,19,15,2,0,0,21,-909,21,-909,4,4,1,-909,-909,0,2,0,0,13,23,17,17,21,21,2,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,51,27,51,4,4,5,3,15,-909,5,58,12,5,0,4,4,7,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,-909,27,-909,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,4,4,5,3,15,-909,5,58,13,5,0,7,4,4,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,-909,27,-909,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,4,4,5,3,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,1,-909,-909,-909,-909,4,4,3,1}, +{7,0,-909,0,0,2,0,0,-1,20,53,28,19,19,9,258,-909,-909,-909,29,19,26,0,0,32,-909,72,-909,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,5,5,6,3,19,-909,7,74,19,7,0,8,5,5,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,20,53,28,19,19,9,258,-909,-909,-909,29,19,26,0,0,32,-909,72,-909,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,5,5,6,3,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,20,52,28,19,19,9,258,-909,-909,-909,29,19,6,0,0,32,-909,60,-909,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,98,35,98,5,5,6,3,19,-909,7,74,22,7,0,8,5,5,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,20,52,28,19,19,9,258,-909,-909,-909,29,19,6,0,0,32,-909,60,-909,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,98,35,98,5,5,6,3,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,2,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,-909,32,-909,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,5,-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,8,6,5,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1}, +{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,-909,32,-909,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} + // *** End of generated data *** }; @@ -95,7 +99,10 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme {SE_SettingsList, QS60StyleEnums::SP_QsnFrSetOptCenter}, {SE_TableItem, QS60StyleEnums::SP_QsnFrCaleCenter}, {SE_TableHeaderItem, QS60StyleEnums::SP_QsnFrCaleHeadingCenter}, - {SE_ToolTip, QS60StyleEnums::SP_QsnFrPopupPreviewCenter} + {SE_ToolTip, QS60StyleEnums::SP_QsnFrPopupPreviewCenter}, + {SE_ToolBar, QS60StyleEnums::SP_QsnFrPopupSubCenter}, + {SE_ToolBarButton, QS60StyleEnums::SP_QsnFrSctrlButtonCenter}, + {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed}, }; static const int frameElementsCount = int(sizeof(QS60StylePrivate::m_frameElementsData)/sizeof(QS60StylePrivate::m_frameElementsData[0])); @@ -302,6 +309,16 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter, case SE_ToolTip: drawFrame(SF_ToolTip, painter, rect, flags | SF_PointNorth); break; + case SE_ToolBar: + drawFrame(SF_ToolBar, painter, rect, flags | SF_PointNorth); + break; + case SE_ToolBarButton: + drawFrame(SF_ToolBarButton, painter, rect, flags | SF_PointNorth); + break; + case SE_ToolBarButtonPressed: + drawFrame(SF_ToolBarButtonPressed, painter, rect, flags | SF_PointNorth); + break; + default: break; } @@ -831,15 +848,73 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast(option)) { const State bflags = toolBtn->state; const QRect button(subControlRect(control, toolBtn, SC_ToolButton, widget)); - QStyleOptionToolButton label = *toolBtn; + QStyleOptionToolButton toolButton = *toolBtn; if (sub&SC_ToolButton) { QStyleOption tool(0); tool.palette = toolBtn->palette; + + // Check if toolbutton is in toolbar. + QToolBar *toolBar = 0; + if (widget) + toolBar = qobject_cast(widget->parentWidget()); + if (bflags & (State_Sunken | State_On | State_Raised)) { tool.rect = button; tool.state = bflags; - drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); + + // todo: I'd like to move extension button next to where last button is + // however, the painter seems to want to clip the button rect even if I turn of the clipping. + if (toolBar && (qobject_cast(widget))){ + /*QList actionList = toolBar->actions(); + const int actionCount = actionList.count(); + const int toolbarWidth = toolBar->width(); + const int extButtonWidth = pixelMetric(PM_ToolBarExtensionExtent, option, widget); + const int toolBarButtonWidth = pixelMetric(PM_ToolBarIconSize, option, widget); + const int frame = pixelMetric(PM_ToolBarFrameWidth, option, widget); + const int margin = pixelMetric(PM_ToolBarItemMargin, option, widget); + const int border = frame + margin; + const int spacing = pixelMetric(PM_ToolBarItemSpacing, option, widget); + const int toolBarButtonArea = toolbarWidth - extButtonWidth - spacing - 2*border; + const int numberOfVisibleButtons = toolBarButtonArea / toolBarButtonWidth; + // new extension button place is after border and all the other visible buttons (with spacings) + const int newXForExtensionButton = numberOfVisibleButtons * toolBarButtonWidth + (numberOfVisibleButtons-1)*spacing + border; + painter->save(); + painter->setClipping(false); + tool.rect.translate(-newXForExtensionButton,0); + painter->restore();*/ + } + + if (toolBar){ + /*if (toolBar->orientation() == Qt::Vertical){ + // todo: I'd like to make all vertical buttons the same size, but again the painter + // prefers to use clipping for button rects, even though clipping has been set off. + painter->save(); + painter->setClipping(false); + + const int origWidth = tool.rect.width(); + const int newWidth = toolBar->width()-2*pixelMetric(PM_ToolBarFrameWidth, option, widget); + painter->translate(origWidth-newWidth,0); + tool.rect.translate(origWidth-tool.rect.width(),0); + tool.rect.setWidth(newWidth); + + if (option->state & QStyle::State_Sunken) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ToolBarButtonPressed, painter, tool.rect, flags); + else + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ToolBarButton, painter, tool.rect, flags); + + }*/ + if (option->state & QStyle::State_Sunken) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ToolBarButtonPressed, painter, tool.rect, flags); + else + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ToolBarButton, painter, tool.rect, flags); + /* + if (toolBar->orientation() == Qt::Vertical) + painter->restore(); + */ + } else { + drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); + } } } if (toolBtn->state & State_HasFocus) { @@ -867,15 +942,15 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom break; default: break; } - label.rect = button; - drawPrimitive(pe, &label, painter, widget); + toolButton.rect = button; + drawPrimitive(pe, &toolButton, painter, widget); } if (toolBtn->text.length()>0 || !toolBtn->icon.isNull()) { const int frameWidth = pixelMetric(PM_DefaultFrameWidth, option, widget); - label.rect = button.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth); - drawControl(CE_ToolButtonLabel, &label, painter, widget); + toolButton.rect = button.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth); + drawControl(CE_ToolButtonLabel, &toolButton, painter, widget); } } break; @@ -1556,6 +1631,50 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QCommonStyle::drawControl(element, header, painter, widget); } break; + +#ifndef QT_NO_TOOLBAR + case CE_ToolBar: + if (const QStyleOptionToolBar *toolBar = qstyleoption_cast(option)) { + const QToolBar *tbWidget = qobject_cast(widget); + + if (!tbWidget || (widget && qobject_cast(widget->parentWidget()))) + break; + + // Normally in S60 5.0+ there is no background for toolbar, but in some cases with versatile QToolBar, + // it looks a bit strange. So, lets fillRect with Button. + if (!QS60StylePrivate::isToolBarBackground()) { + QList actions = tbWidget->actions(); + bool justToolButtonsInToolBar = true; + for (int i = 0; i < actions.size(); ++i) { + QWidget *childWidget = tbWidget->widgetForAction(actions.at(i)); + const QToolButton *button = qobject_cast(childWidget); + if (!button){ + justToolButtonsInToolBar = false; + } + } + + // Draw frame background + // for vertical toolbars with text only and + // for toolbars with extension buttons and + // for toolbars with widgets in them. + if (!justToolButtonsInToolBar || + (tbWidget && + (tbWidget->orientation() == Qt::Vertical) && + (tbWidget->toolButtonStyle() == Qt::ToolButtonTextOnly))) { + painter->save(); + if (widget) + painter->setBrush(widget->palette().button()); + painter->setOpacity(0.3); + painter->fillRect(toolBar->rect, painter->brush()); + painter->restore(); + } + } else { + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ToolBar, painter, toolBar->rect, flags); + } + } + break; +#endif //QT_NO_TOOLBAR + case CE_ShapedFrame: case CE_MenuVMargin: case CE_MenuHMargin: @@ -1592,9 +1711,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, case CE_ScrollBarFirst: case CE_ScrollBarLast: case CE_FocusFrame: -#ifndef QT_NO_TOOLBAR - case CE_ToolBar: -#endif //QT_NO_TOOLBAR #ifndef QT_NO_TOOLBOX case CE_ToolBoxTab: case CE_ToolBoxTabShape: @@ -1876,6 +1992,14 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti } break; +#ifndef QT_NO_TOOLBAR + case PE_IndicatorToolBarHandle: + // no toolbar handles in S60/AVKON UI + case PE_IndicatorToolBarSeparator: + // no separators in S60/AVKON UI + break; +#endif //QT_NO_TOOLBAR + case PE_PanelMenuBar: case PE_FrameMenu: break; //disable frame in menu @@ -1900,8 +2024,6 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_PROGRESSBAR #ifndef QT_NO_TOOLBAR case PE_PanelToolBar: - case PE_IndicatorToolBarHandle: - case PE_IndicatorToolBarSeparator: #endif //QT_NO_TOOLBAR #ifndef QT_NO_COLUMNVIEW case PE_IndicatorColumnViewArrow: @@ -2371,7 +2493,7 @@ QVariant QS60Style::styleProperty(const char *name) const } QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, - const QStyleOption * option, const QWidget * widget) const + const QStyleOption *option, const QWidget *widget) const { const int iconDimension = QS60StylePrivate::pixelMetric(QStyle::PM_ToolBarIconSize); const QRect iconSize = (!option) ? QRect(0,0,iconDimension,iconDimension) : option->rect; @@ -2437,6 +2559,16 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, case QStyle::SP_TrashIcon: part = QS60StyleEnums::SP_QgnNoteErased; break; + case QStyle::SP_ToolBarHorizontalExtensionButton: + part = QS60StyleEnums::SP_QgnIndiSubMenu; + if (QApplication::layoutDirection() == Qt::RightToLeft) + adjustedFlags |= QS60StylePrivate::SF_PointSouth; + break; + case QStyle::SP_ToolBarVerticalExtensionButton: + adjustedFlags |= QS60StylePrivate::SF_PointEast; + part = QS60StyleEnums::SP_QgnIndiSubMenu; + break; + default: return QCommonStyle::standardIconImplementation(standardIcon, option, widget); } diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index c11d89a..8839866 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -191,7 +191,34 @@ public: SP_QsnFrSetOptSideB, SP_QsnFrSetOptSideL, SP_QsnFrSetOptSideR, - SP_QsnFrSetOptCenter + SP_QsnFrSetOptCenter, + SP_QsnFrPopupSubCornerTl, // Toolbar background + SP_QsnFrPopupSubCornerTr, + SP_QsnFrPopupSubCornerBl, + SP_QsnFrPopupSubCornerBr, + SP_QsnFrPopupSubSideT, + SP_QsnFrPopupSubSideB, + SP_QsnFrPopupSubSideL, + SP_QsnFrPopupSubSideR, + SP_QsnFrPopupSubCenter, + SP_QsnFrSctrlButtonCornerTl, // Toolbar button + SP_QsnFrSctrlButtonCornerTr, + SP_QsnFrSctrlButtonCornerBl, + SP_QsnFrSctrlButtonCornerBr, + SP_QsnFrSctrlButtonSideT, + SP_QsnFrSctrlButtonSideB, + SP_QsnFrSctrlButtonSideL, + SP_QsnFrSctrlButtonSideR, + SP_QsnFrSctrlButtonCenter, + SP_QsnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed + SP_QsnFrSctrlButtonCornerTrPressed, + SP_QsnFrSctrlButtonCornerBlPressed, + SP_QsnFrSctrlButtonCornerBrPressed, + SP_QsnFrSctrlButtonSideTPressed, + SP_QsnFrSctrlButtonSideBPressed, + SP_QsnFrSctrlButtonSideLPressed, + SP_QsnFrSctrlButtonSideRPressed, + SP_QsnFrSctrlButtonCenterPressed }; enum ColorLists { @@ -245,7 +272,10 @@ public: SE_SettingsList, SE_TableItem, SE_TableHeaderItem, - SE_ToolTip //own graphic available on 3.2+ releases + SE_ToolTip, //own graphic available on 3.2+ releases, + SE_ToolBar, + SE_ToolBarButton, + SE_ToolBarButtonPressed }; enum SkinFrameElements { @@ -257,7 +287,10 @@ public: SF_SettingsList, SF_TableItem, SF_TableHeaderItem, - SF_ToolTip + SF_ToolTip, + SF_ToolBar, + SF_ToolBarButton, + SF_ToolBarButtonPressed }; enum SkinElementFlag { @@ -305,6 +338,8 @@ public: static QPixmap backgroundTexture(); static bool isTouchSupported(); + static bool isToolBarBackground(); + // calculates average color based on button skin graphics (minus borders). QColor colorFromFrameGraphics(QS60StylePrivate::SkinFrameElements frame) const; void setThemePalette(QWidget *widget) const; diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 68f0b70..17c1ebe 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -131,7 +131,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, // The size of topLeft defines all other sizes const QSize cornerSize(partSize(topLeft)); // if frame is so small that corners would cover it completely, draw only center piece - const bool drawOnlyCenter = + const bool drawOnlyCenter = 2 * cornerSize.width() + 1 >= size.width() || 2 * cornerSize.height() + 1 >= size.height(); const int cornerWidth = cornerSize.width(); @@ -200,6 +200,12 @@ bool QS60StylePrivate::isTouchSupported() #endif } +bool QS60StylePrivate::isToolBarBackground() +{ + return true; +} + + QFont QS60StylePrivate::s60Font_specific(QS60StyleEnums::FontCategories fontCategory, int pointSize) { QFont result; diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp index a1e7800..353926e 100644 --- a/src/gui/styles/qs60style_symbian.cpp +++ b/src/gui/styles/qs60style_symbian.cpp @@ -201,8 +201,8 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrPopupSideR */ {KAknsIIDQsnFrPopupSideR, ENoDraw, ES60_AllReleases, -1,-1,-1}, /* SP_QsnFrPopupCenter */ {KAknsIIDQsnFrPopupCenter, ENoDraw, ES60_AllReleases, -1,-1,-1}, - - /* SP_QsnFrPopupPreviewCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_3_1, -1, EAknsMajorSkin, 0x19c5}, + // ToolTip graphics different in 3.1 vs. 3.2+. + /* SP_QsnFrPopupPreviewCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_3_1, -1, EAknsMajorSkin, 0x19c5}, /* KAknsIIDQsnFrPopupPreviewCornerTl */ /* SP_QsnFrPopupPreviewCornerTr */ {KAknsIIDQsnFrPopupCornerTr, ENoDraw, ES60_3_1, -1, EAknsMajorSkin, 0x19c6}, /* SP_QsnFrPopupPreviewCornerBl */ {KAknsIIDQsnFrPopupCornerBl, ENoDraw, ES60_3_1, -1, EAknsMajorSkin, 0x19c3}, /* SP_QsnFrPopupPreviewCornerBr */ {KAknsIIDQsnFrPopupCornerBr, ENoDraw, ES60_3_1, -1, EAknsMajorSkin, 0x19c4}, @@ -221,6 +221,39 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrSetOptSideL */ {KAknsIIDQsnFrSetOptSideL, ENoDraw, ES60_AllReleases, -1,-1,-1}, /* SP_QsnFrSetOptSideR */ {KAknsIIDQsnFrSetOptSideR, ENoDraw, ES60_AllReleases, -1,-1,-1}, /* SP_QsnFrSetOptCenter */ {KAknsIIDQsnFrSetOptCenter, ENoDraw, ES60_AllReleases, -1,-1,-1}, + + // No toolbar frame for 5.0+ releases. + /* SP_QsnFrPopupSubCornerTl */ {KAknsIIDQsnFrPopupSubCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubCornerTr */ {KAknsIIDQsnFrPopupSubCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubCornerBl */ {KAknsIIDQsnFrPopupSubCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubCornerBr */ {KAknsIIDQsnFrPopupSubCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubSideT */ {KAknsIIDQsnFrPopupSubSideT, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubSideB */ {KAknsIIDQsnFrPopupSubSideB, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubSideL */ {KAknsIIDQsnFrPopupSubSideL, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubSideR */ {KAknsIIDQsnFrPopupSubSideR, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + /* SP_QsnFrPopupSubCenter */ {KAknsIIDQsnFrPopupCenterSubmenu, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1,-1}, + + // Toolbar graphics is different in 3.1/3.2 vs. 5.0 + /* SP_QsnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/ + /* SP_QsnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2302}, + /* SP_QsnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2303}, + /* SP_QsnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2304}, + /* SP_QsnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2305}, + /* SP_QsnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2306}, + /* SP_QsnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2307}, + /* SP_QsnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2308}, + /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ + + // No pressed state for toolbar button in 3.1/3.2. + /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrSctrlButtonCornerTlPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2171}, /*KAknsIIDQsnFrButtonTbCornerTl*/ + /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrSctrlButtonCornerTrPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2172}, + /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrSctrlButtonCornerBlPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2173}, + /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrSctrlButtonCornerBrPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2174}, + /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrSctrlButtonSideTPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2175}, + /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrSctrlButtonSideBPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2176}, + /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrSctrlButtonSideLPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2177}, + /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrSctrlButtonSideRPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2178}, + /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrSctrlButtonCenterPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2179} }; QPixmap QS60StyleModeSpecifics::skinnedGraphics( @@ -372,6 +405,11 @@ bool QS60StylePrivate::isTouchSupported() return bool(AknLayoutUtils::PenEnabled()); } +bool QS60StylePrivate::isToolBarBackground() +{ + return (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2); +} + void qt_s60_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset) { const QPixmap backgroundTexture(QS60StylePrivate::backgroundTexture()); @@ -573,13 +611,19 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme switch(frameElement) { case QS60StylePrivate::SF_ToolTip: if (QSysInfo::s60Version()==QSysInfo::SV_S60_5_0 || QSysInfo::s60Version()==QSysInfo::SV_S60_3_2) { - centerId.Set(EAknsMajorSkin, 0x5300); - frameId.Set(EAknsMajorGeneric, 0x19c2); + centerId.Set(EAknsMajorGeneric, 0x19c2); + frameId.Set(EAknsMajorSkin, 0x5300); } else { centerId.Set(KAknsIIDQsnFrPopupCenter); frameId.iMinor = centerId.iMinor - 9; } break; + case QS60StylePrivate::SF_ToolBar: + if (QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 || QSysInfo::s60Version()==QSysInfo::SV_S60_3_2) { + centerId.Set(KAknsIIDQsnFrPopupCenterSubmenu); + frameId.Set(KAknsIIDQsnFrPopupSub); + } + break; default: // center should be correct here frameId.iMinor = centerId.iMinor - 9; -- cgit v0.12 From d333404c72aa6c707cf389899999f2247454b824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Wed, 29 Apr 2009 15:46:12 +0300 Subject: S60Style: Use title font for GroupBox title. --- src/gui/styles/qs60style.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 5747ceb..20eaf16 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -986,6 +986,11 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { const QColor textColor = groupBox->textColor; painter->save(); + + const QFont suggestedFont = d->s60Font( + QS60StyleEnums::FC_Title, painter->font().pointSizeF()); + painter->setFont(suggestedFont); + if (textColor.isValid()) painter->setPen(textColor); int alignment = int(groupBox->textAlignment); -- cgit v0.12 From 37c49413e8ba1880bce5989c1b2f1d0d9bb0e663 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 29 Apr 2009 18:18:10 +0300 Subject: Fixed temporary file rename problem in Symbian OS. In Symbian OS temp file rename will always go to fallback solution since close for temp file does not really close the handle. The fallback implements rename by copy and remove. But in symbian OS also the remove after copy failed since it was done through local 'in' object. However the file was still open in object doing the remove. The fix is to close the local 'in' object and use current 'this' object to remove the file. This object points to QTemporaryFile and it will make sure that temp file is first closed before trying to remove. --- src/corelib/io/qfile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index af10c31..01a236c 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -737,7 +737,8 @@ QFile::rename(const QString &newName) error = true; } if(!error) { - if (!in.remove()) { + in.close(); + if (!remove()) { d->setError(QFile::RenameError, tr("Cannot remove source file")); error = true; } -- cgit v0.12 From 969b9f644187f2a04ec6c3a09e6446538823026b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Thu, 30 Apr 2009 10:08:21 +0300 Subject: S60Style: buildbreak fix - missing lines from commit d333404c72aa6c707cf389899999f2247454b824 --- src/gui/styles/qs60style.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 20eaf16..a232c28 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -741,6 +741,9 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom { const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; SubControls sub = option->subControls; + + Q_D(const QS60Style); + switch (control) { #ifndef QT_NO_SCROLLBAR case CC_ScrollBar: @@ -2203,12 +2206,12 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple QS60StylePrivate::pixelMetric(QStyle::PM_ButtonIconSize) + 2*buttonMargin; //todo: buttonMargin commented out as WAY too big in pixel metrics QSize buttonSize; - buttonSize.setHeight(qMax(8, spinbox->rect.height()/2 - frameThickness)); + buttonSize.setHeight(qMax(8, spinbox->rect.height() - frameThickness)); buttonSize.setWidth(buttonWidth); buttonSize = buttonSize.expandedTo(QApplication::globalStrut()); const int y = frameThickness + spinbox->rect.y(); - const int x = spinbox->rect.x() + spinbox->rect.width() - frameThickness - buttonSize.width(); + const int x = spinbox->rect.x() + spinbox->rect.width() - frameThickness - 2*buttonSize.width(); switch (scontrol) { case SC_SpinBoxUp: @@ -2219,7 +2222,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple case SC_SpinBoxDown: if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) return QRect(); - ret = QRect(x, y + buttonSize.height(), buttonWidth, buttonSize.height()); + ret = QRect(x+buttonSize.width(), y, buttonWidth, buttonSize.height()); break; case SC_SpinBoxEditField: if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) -- cgit v0.12 From 6b7b289ef47c4e8300a1f5a9ba86044b890a1014 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 30 Apr 2009 10:11:49 +0300 Subject: Fixed bug in QTemporaryFile::rename. The nativeInitFileName of file engine was not set in rename fallback case. Now it is set by calling: fileEngine()->setFileName This error was found with QNetworkDiskCache test case. --- src/corelib/io/qfile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 01a236c..4a20c97 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -743,10 +743,12 @@ QFile::rename(const QString &newName) error = true; } } - if (error) + if (error) { out.remove(); - else + } else { + fileEngine()->setFileName(newName); setFileName(newName); + } return !error; } } -- cgit v0.12 From 5866a3ad648a0b8f2edda5b49c86fbdd6e4383b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Thu, 30 Apr 2009 10:16:24 +0300 Subject: S60Style: Layout spinbox so that up and down buttons are side-by-side, not on top of each other. --- src/gui/styles/qs60style.cpp | 79 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 13 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index a232c28..f3213e9 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -741,9 +741,9 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom { const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; SubControls sub = option->subControls; - + Q_D(const QS60Style); - + switch (control) { #ifndef QT_NO_SCROLLBAR case CC_ScrollBar: @@ -821,7 +821,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom if (sub & SC_ComboBoxArrow) { const int iconRectWidth = buttonOption.rect.width()>>1; - const int nudgeWidth =iconRectWidth>>1; + const int nudgeWidth = iconRectWidth>>1; // Draw the little arrow const QRect arrowRect(((buttonOption.rect.left()+buttonOption.rect.right())>>1) - nudgeWidth, @@ -962,10 +962,64 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom case CC_SpinBox: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { QStyleOptionSpinBox copy = *spinBox; + PrimitiveElement pe; + + /*if (spinBox->frame && (spinBox->subControls & SC_SpinBoxFrame)) { + QRect r = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxFrame, widget); + qDrawWinPanel(painter, r, spinBox->palette, true); + }*/ + + if (spinBox->subControls & SC_SpinBoxUp) { + copy.subControls = SC_SpinBoxUp; + QPalette pal2 = spinBox->palette; + if (!(spinBox->stepEnabled & QAbstractSpinBox::StepUpEnabled)) { + pal2.setCurrentColorGroup(QPalette::Disabled); + copy.state &= ~State_Enabled; + } + + copy.palette = pal2; + + if (spinBox->activeSubControls == SC_SpinBoxUp && (spinBox->state & State_Sunken)) { + copy.state |= State_On; + copy.state |= State_Sunken; + } else { + copy.state |= State_Raised; + copy.state &= ~State_Sunken; + } + pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinPlus + : PE_IndicatorSpinUp); + + copy.rect = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxUp, widget); + drawPrimitive(PE_PanelButtonBevel, ©, painter, widget); + copy.rect.adjust(1, 1, -1, -1); + drawPrimitive(pe, ©, painter, widget); + } + + if (spinBox->subControls & SC_SpinBoxDown) { + copy.subControls = SC_SpinBoxDown; + copy.state = spinBox->state; + QPalette pal2 = spinBox->palette; + if (!(spinBox->stepEnabled & QAbstractSpinBox::StepDownEnabled)) { + pal2.setCurrentColorGroup(QPalette::Disabled); + copy.state &= ~State_Enabled; + } + copy.palette = pal2; - // Let the base class draw the wole thing except the qDrawWinPanel 'frame' with Windows95-look - copy.frame = false; - QCommonStyle::drawComplexControl(control, ©, painter, widget); + if (spinBox->activeSubControls == SC_SpinBoxDown && (spinBox->state & State_Sunken)) { + copy.state |= State_On; + copy.state |= State_Sunken; + } else { + copy.state |= State_Raised; + copy.state &= ~State_Sunken; + } + pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinMinus + : PE_IndicatorSpinDown); + + copy.rect = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxDown, widget); + drawPrimitive(PE_PanelButtonBevel, ©, painter, widget); + copy.rect.adjust(1, 1, -1, -1); + drawPrimitive(pe, ©, painter, widget); + } } break; #endif //QT_NO_SPINBOX @@ -989,11 +1043,11 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { const QColor textColor = groupBox->textColor; painter->save(); - + const QFont suggestedFont = d->s60Font( QS60StyleEnums::FC_Title, painter->font().pointSizeF()); painter->setFont(suggestedFont); - + if (textColor.isValid()) painter->setPen(textColor); int alignment = int(groupBox->textAlignment); @@ -1884,19 +1938,18 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_IndicatorSpinUp: case PE_IndicatorSpinMinus: case PE_IndicatorSpinPlus: - { if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { QStyleOptionSpinBox optionSpinBox = *spinBox; - if (element==PE_IndicatorSpinDown || element==PE_IndicatorSpinUp) - optionSpinBox.rect.adjust(2,2,-2,-2); QCommonStyle::drawPrimitive(element, &optionSpinBox, painter, widget); - } else if (const QStyleOptionFrame *cmb = qstyleoption_cast(option)) { + } +#ifndef QT_NO_COMBOBOX + else if (const QStyleOptionFrame *cmb = qstyleoption_cast(option)) { // We want to draw down arrow here for comboboxes as well. QStyleOptionFrame comboBox = *cmb; comboBox.rect.adjust(0,2,0,-2); QCommonStyle::drawPrimitive(element, &comboBox, painter, widget); } - } +#endif //QT_NO_COMBOBOX break; #endif //QT_NO_SPINBOX case PE_FrameFocusRect: -- cgit v0.12 From b20ca123c521a1dae695045211c253c221ed604a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Thu, 30 Apr 2009 13:06:55 +0300 Subject: S60Style: Build break fix for 3.2SDK environment (it is lacking some skin IDs that are available in 3.2RnD environment). --- src/gui/styles/qs60style_symbian.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp index 353926e..ab1deb0 100644 --- a/src/gui/styles/qs60style_symbian.cpp +++ b/src/gui/styles/qs60style_symbian.cpp @@ -245,15 +245,15 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ // No pressed state for toolbar button in 3.1/3.2. - /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrSctrlButtonCornerTlPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2171}, /*KAknsIIDQsnFrButtonTbCornerTl*/ - /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrSctrlButtonCornerTrPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2172}, - /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrSctrlButtonCornerBlPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2173}, - /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrSctrlButtonCornerBrPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2174}, - /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrSctrlButtonSideTPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2175}, - /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrSctrlButtonSideBPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2176}, - /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrSctrlButtonSideLPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2177}, - /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrSctrlButtonSideRPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2178}, - /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrSctrlButtonCenterPressed, ENoDraw, ES60_5_0, -1,EAknsMajorSkin,0x2179} + /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/ + /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2622}, + /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2623}, + /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2624}, + /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2625}, + /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2626}, + /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2627}, + /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2628}, + /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, -1,EAknsMajorSkin,0x2629} }; QPixmap QS60StyleModeSpecifics::skinnedGraphics( -- cgit v0.12