diff options
Diffstat (limited to 'src')
49 files changed, 5971 insertions, 1794 deletions
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index b163ad4..22f1527 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -192,8 +192,11 @@ namespace Phonon HRESULT hr = S_OK; - m_currentRender = w.graph; - m_currentRenderId = w.id; + { + QMutexLocker locker(&m_currentMutex); + m_currentRender = w.graph; + m_currentRenderId = w.id; + } if (w.task == ReplaceGraph) { int index = -1; for(int i = 0; i < FILTER_COUNT; ++i) { @@ -217,9 +220,6 @@ namespace Phonon m_graphHandle[index].handle = h; } } else if (w.task == Render) { - //we need to unlock here because the use might trigger a call to abort - //which uses the same mutex - locker.unlock(); if (w.filter) { //let's render pins w.graph->AddFilter(w.filter, 0); @@ -238,7 +238,6 @@ namespace Phonon if (hr != E_ABORT) { emit asyncRenderFinished(w.id, hr, w.graph); } - locker.relock(); } else if (w.task == Seek) { //that's a seekrequest ComPointer<IMediaSeeking> mediaSeeking(w.graph, IID_IMediaSeeking); @@ -311,12 +310,22 @@ namespace Phonon } } - m_currentRender = Graph(); - m_currentRenderId = 0; + { + QMutexLocker locker(&m_currentMutex); + m_currentRender = Graph(); + m_currentRenderId = 0; + } } void WorkerThread::abortCurrentRender(qint16 renderId) { + { + QMutexLocker locker(&m_currentMutex); + if (m_currentRender && m_currentRenderId == renderId) { + m_currentRender->Abort(); + } + } + QMutexLocker locker(&m_mutex); bool found = false; for(int i = 0; !found && i < m_queue.size(); ++i) { @@ -324,12 +333,11 @@ namespace Phonon if (w.id == renderId) { found = true; m_queue.removeAt(i); + if (m_queue.isEmpty()) { + m_waitCondition.reset(); + } } } - - if (m_currentRender && m_currentRenderId == renderId) { - m_currentRender->Abort(); - } } //tells the thread to stop processing @@ -504,6 +512,8 @@ namespace Phonon qSwap(m_graphs[0], m_graphs[1]); //swap the graphs + m_graphs[1]->stop(); //make sure we stop the previous graph + if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid && catchComError(currentGraph()->renderResult())) { setState(Phonon::ErrorState); diff --git a/src/3rdparty/phonon/ds9/mediaobject.h b/src/3rdparty/phonon/ds9/mediaobject.h index fe52604..a6beb5f 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.h +++ b/src/3rdparty/phonon/ds9/mediaobject.h @@ -143,7 +143,8 @@ namespace Phonon bool m_finished; quint16 m_currentWorkId; QWinWaitCondition m_waitCondition; - QMutex m_mutex; + QMutex m_mutex; // mutex for the m_queue, m_finished and m_currentWorkId + QMutex m_currentMutex; //mutex for current renderer and id //this is for WaitForMultipleObjects struct diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp index 34ff8cb..091be16 100644 --- a/src/3rdparty/phonon/ds9/videowidget.cpp +++ b/src/3rdparty/phonon/ds9/videowidget.cpp @@ -84,7 +84,19 @@ namespace Phonon void setCurrentRenderer(AbstractVideoRenderer *renderer) { m_currentRenderer = renderer; - update(); + //we disallow repaint on that widget for just a fraction of second + //this allows better transition between videos + setUpdatesEnabled(false); + m_flickerFreeTimer.start(20, this); + } + + void timerEvent(QTimerEvent *e) + { + if (e->timerId() == m_flickerFreeTimer.timerId()) { + m_flickerFreeTimer.stop(); + setUpdatesEnabled(true); + } + QWidget::timerEvent(e); } QSize sizeHint() const @@ -106,6 +118,8 @@ namespace Phonon void paintEvent(QPaintEvent *e) { + if (!updatesEnabled()) + return; //this avoids repaint from native events checkCurrentRenderingMode(); m_currentRenderer->repaintCurrentFrame(this, e->rect()); } @@ -160,6 +174,7 @@ namespace Phonon VideoWidget *m_node; AbstractVideoRenderer *m_currentRenderer; QVariant m_restoreScreenSaverActive; + QBasicTimer m_flickerFreeTimer; }; VideoWidget::VideoWidget(QWidget *parent) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp index 118751e..f64219c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp @@ -942,6 +942,37 @@ UString UString::from(int i) return UString(p, static_cast<int>(end - p)); } +#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +UString UString::from(int64_t i) +{ + UChar buf[1 + sizeof(i) * 3]; + UChar* end = buf + sizeof(buf) / sizeof(UChar); + UChar* p = end; + + if (i == 0) + *--p = '0'; + else if (i == LLONG_MIN) { + char minBuf[1 + sizeof(i) * 3]; + snprintf(minBuf, sizeof(minBuf) - 1, "%I64d", LLONG_MIN); + return UString(minBuf); + } else { + bool negative = false; + if (i < 0) { + negative = true; + i = -i; + } + while (i) { + *--p = static_cast<unsigned short>((i % 10) + '0'); + i /= 10; + } + if (negative) + *--p = '-'; + } + + return UString(p, static_cast<int>(end - p)); +} +#endif + UString UString::from(unsigned int u) { UChar buf[sizeof(u) * 3]; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h index d01b75d..f2572a9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h @@ -256,6 +256,9 @@ namespace JSC { } static UString from(int); +#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) + static UString from(int64_t i); +#endif static UString from(unsigned int); static UString from(long); static UString from(double); diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 2eb7c08..68da1d6 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3218,3 +3218,20 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 CONFIG += no_debug_info } +!win32-g++:win32:contains(QMAKE_HOST.arch, x86_64):{ + asm_compiler.commands = ml64 /c + asm_compiler.commands += /Fo ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} + asm_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + asm_compiler.input = ASM_SOURCES + asm_compiler.variable_out = OBJECTS + asm_compiler.name = compiling[asm] ${QMAKE_FILE_IN} + silent:asm_compiler.commands = @echo compiling[asm] ${QMAKE_FILE_IN} && $$asm_compiler.commands + QMAKE_EXTRA_COMPILERS += asm_compiler + + ASM_SOURCES += \ + plugins/win/PaintHooks.asm + if(win32-msvc2005|win32-msvc2008):equals(TEMPLATE_PREFIX, "vc") { + SOURCES += \ + plugins/win/PaintHooks.asm + } +} diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PaintHooks.asm b/src/3rdparty/webkit/WebCore/plugins/win/PaintHooks.asm new file mode 100644 index 0000000..1508813 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/plugins/win/PaintHooks.asm @@ -0,0 +1,50 @@ +;/* +; Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) +; +; This library is free software; you can redistribute it and/or +; modify it under the terms of the GNU Library General Public +; License as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; This library is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; Library General Public License for more details. +; +; You should have received a copy of the GNU Library General Public License +; along with this library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +; Boston, MA 02110-1301, USA. +;*/ + +;HDC __stdcall _HBeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint); + +PUBLIC _HBeginPaint + +_TEXT SEGMENT + +_HBeginPaint PROC + mov r10,rcx + mov eax,1017h + syscall + ret +_HBeginPaint ENDP + +_TEXT ENDS + +;BOOL __stdcall _HEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint); + +PUBLIC _HEndPaint + +_TEXT SEGMENT + +_HEndPaint PROC + mov r10,rcx + mov eax,1019h + syscall + ret +_HEndPaint ENDP + +_TEXT ENDS + +END diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index c97984d..2687186 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -117,6 +117,14 @@ static BYTE* beginPaint; static unsigned endPaintSysCall; static BYTE* endPaint; +typedef HDC (WINAPI *PtrBeginPaint)(HWND, PAINTSTRUCT*); +typedef BOOL (WINAPI *PtrEndPaint)(HWND, const PAINTSTRUCT*); + +#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +extern "C" HDC __stdcall _HBeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint); +extern "C" BOOL __stdcall _HEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint); +#endif + HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint) { PluginView* pluginView = reinterpret_cast<PluginView*>(GetProp(hWnd, kWebPluginViewProperty)); @@ -139,12 +147,14 @@ HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint) : "memory" ); return result; -#else +#elif defined(_M_IX86) // Call through to the original BeginPaint. __asm mov eax, beginPaintSysCall __asm push lpPaint __asm push hWnd __asm call beginPaint +#else + return _HBeginPaint(hWnd, lpPaint); #endif } @@ -166,12 +176,14 @@ BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint) : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*endPaint) ); return result; -#else +#elif defined (_M_IX86) // Call through to the original EndPaint. __asm mov eax, endPaintSysCall __asm push lpPaint __asm push hWnd __asm call endPaint +#else + return _HEndPaint(hWnd, lpPaint); #endif } @@ -184,6 +196,7 @@ static void hook(const char* module, const char* proc, unsigned& sysCallID, BYTE pProc = reinterpret_cast<BYTE*>(reinterpret_cast<ptrdiff_t>(GetProcAddress(hMod, proc))); +#if COMPILER(GCC) || defined(_M_IX86) if (pProc[0] != 0xB8) return; @@ -199,6 +212,35 @@ static void hook(const char* module, const char* proc, unsigned& sysCallID, BYTE *reinterpret_cast<unsigned*>(pProc + 1) = reinterpret_cast<intptr_t>(pNewProc) - reinterpret_cast<intptr_t>(pProc + 5); pProc += 5; +#else + /* Disassembly of BeginPaint() + 00000000779FC5B0 4C 8B D1 mov r10,rcx + 00000000779FC5B3 B8 17 10 00 00 mov eax,1017h + 00000000779FC5B8 0F 05 syscall + 00000000779FC5BA C3 ret + 00000000779FC5BB 90 nop + 00000000779FC5BC 90 nop + 00000000779FC5BD 90 nop + 00000000779FC5BE 90 nop + 00000000779FC5BF 90 nop + 00000000779FC5C0 90 nop + 00000000779FC5C1 90 nop + 00000000779FC5C2 90 nop + 00000000779FC5C3 90 nop + */ + // Check for the signature as in the above disassembly + DWORD guard = 0xB8D18B4C; + if (*reinterpret_cast<DWORD*>(pProc) != guard) + return; + + DWORD flOldProtect; + VirtualProtect(pProc, 12, PAGE_EXECUTE_READWRITE, & flOldProtect); + pProc[0] = 0x48; // mov rax, this + pProc[1] = 0xb8; + *(__int64*)(pProc+2) = (__int64)pNewProc; + pProc[10] = 0xff; // jmp rax + pProc[11] = 0xe0; +#endif } static void setUpOffscreenPaintingHooks(HDC (WINAPI*hookedBeginPaint)(HWND, PAINTSTRUCT*), BOOL (WINAPI*hookedEndPaint)(HWND, const PAINTSTRUCT*)) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index 1a45fe6..613a72f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -105,7 +105,7 @@ void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false); Vector<String> paths; - String qtPath(getenv("QTWEBKIT_PLUGIN_PATH")); + String qtPath(qgetenv("QTWEBKIT_PLUGIN_PATH").data()); qtPath.split(UChar(':'), /* allowEmptyEntries */ false, paths); db->setPluginDirectories(paths); diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 819034a..7c75525 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1525,6 +1525,8 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(QAbstractFileEngine::Fil ret |= FileType; } } else if (d->doStat()) { + if (d->fileAttrib & FILE_ATTRIBUTE_REPARSE_POINT) + ret |= LinkType; if (d->fileAttrib & FILE_ATTRIBUTE_DIRECTORY) { ret |= DirectoryType; } else { diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index eae17b4..d8da606 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -372,32 +372,30 @@ void QProcessPrivate::startProcess() qDebug(" pass environment : %s", environment.isEmpty() ? "no" : "yes"); #endif - DWORD dwCreationFlags = CREATE_NO_WINDOW; - #if defined(Q_OS_WINCE) - QString fullPathProgram = program; - if (!QDir::isAbsolutePath(fullPathProgram)) - fullPathProgram = QFileInfo(fullPathProgram).absoluteFilePath(); - fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\')); - success = CreateProcess((wchar_t*)fullPathProgram.utf16(), - (wchar_t*)args.utf16(), - 0, 0, false, 0, 0, 0, 0, pid); + QString fullPathProgram = program; + if (!QDir::isAbsolutePath(fullPathProgram)) + fullPathProgram = QFileInfo(fullPathProgram).absoluteFilePath(); + fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\')); + success = CreateProcess((wchar_t*)fullPathProgram.utf16(), + (wchar_t*)args.utf16(), + 0, 0, false, 0, 0, 0, 0, pid); #else - dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT; - STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0, - (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, - (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, - 0, 0, 0, - STARTF_USESTDHANDLES, - 0, 0, 0, - stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1] - }; - success = CreateProcess(0, (wchar_t*)args.utf16(), - 0, 0, TRUE, dwCreationFlags, - environment ? envlist.data() : 0, - workingDirectory.isEmpty() ? 0 - : (wchar_t*)QDir::toNativeSeparators(workingDirectory).utf16(), - &startupInfo, pid); + DWORD dwCreationFlags = CREATE_NO_WINDOW; + dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT; + STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0, + (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, + (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, + 0, 0, 0, + STARTF_USESTDHANDLES, + 0, 0, 0, + stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1] + }; + success = CreateProcess(0, (wchar_t*)args.utf16(), + 0, 0, TRUE, dwCreationFlags, + environment ? envlist.data() : 0, + workingDirectory.isEmpty() ? 0 : (wchar_t*)QDir::toNativeSeparators(workingDirectory).utf16(), + &startupInfo, pid); if (stdinChannel.pipe[0] != INVALID_Q_PIPE) { CloseHandle(stdinChannel.pipe[0]); diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 6520170..371770f 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -257,11 +257,13 @@ bool QObjectPrivate::isSender(const QObject *receiver, const char *signal) const QMutexLocker locker(signalSlotLock(q)); if (connectionLists) { if (signal_index < connectionLists->count()) { - const ConnectionList &connectionList = connectionLists->at(signal_index); - for (int i = 0; i < connectionList.count(); ++i) { - const QObjectPrivate::Connection *c = connectionList.at(i); + const QObjectPrivate::Connection *c = + connectionLists->at(signal_index).first; + + while (c) { if (c->receiver == receiver) return true; + c = c->nextConnectionList; } } } @@ -279,11 +281,12 @@ QObjectList QObjectPrivate::receiverList(const char *signal) const QMutexLocker locker(signalSlotLock(q)); if (connectionLists) { if (signal_index < connectionLists->count()) { - const ConnectionList &connectionList = connectionLists->at(signal_index); - for (int i = 0; i < connectionList.count(); ++i) { - const QObjectPrivate::Connection *c = connectionList.at(i); + const QObjectPrivate::Connection *c = connectionLists->at(signal_index).first; + + while (c) { if (c->receiver) returnValue << c->receiver; + c = c->nextConnectionList; } } } @@ -308,7 +311,13 @@ void QObjectPrivate::addConnection(int signal, Connection *c) connectionLists->resize(signal + 1); ConnectionList &connectionList = (*connectionLists)[signal]; - connectionList.append(c); + if (connectionList.last) { + connectionList.last->nextConnectionList = c; + } else { + connectionList.first = c; + } + connectionList.last = c; + cleanConnectionLists(); } @@ -317,14 +326,32 @@ void QObjectPrivate::cleanConnectionLists() if (connectionLists->dirty && !connectionLists->inUse) { // remove broken connections for (int signal = -1; signal < connectionLists->count(); ++signal) { - QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal]; - for (int i = 0; i < connectionList.count(); ++i) { - QObjectPrivate::Connection *c = connectionList.at(i); - if (!c->receiver) { + QObjectPrivate::ConnectionList &connectionList = + (*connectionLists)[signal]; + + // Set to the last entry in the connection list that was *not* + // deleted. This is needed to update the list's last pointer + // at the end of the cleanup. + QObjectPrivate::Connection *last = 0; + + QObjectPrivate::Connection **prev = &connectionList.first; + QObjectPrivate::Connection *c = *prev; + while (c) { + if (c->receiver) { + last = c; + prev = &c->nextConnectionList; + c = *prev; + } else { + QObjectPrivate::Connection *next = c->nextConnectionList; + *prev = next; delete c; - connectionList.removeAt(i--); + c = next; } } + + // Correct the connection list's last pointer. As + // conectionList.last could equal last, this could be a noop + connectionList.last = last; } connectionLists->dirty = false; } @@ -797,17 +824,19 @@ QObject::~QObject() if (d->connectionLists) { ++d->connectionLists->inUse; for (int signal = -1; signal < d->connectionLists->count(); ++signal) { - QObjectPrivate::ConnectionList &connectionList = (*d->connectionLists)[signal]; - for (int i = 0; i < connectionList.count(); ++i) { - QObjectPrivate::Connection *c = connectionList[i]; + QObjectPrivate::ConnectionList &connectionList = + (*d->connectionLists)[signal]; + + while (QObjectPrivate::Connection *c = connectionList.first) { if (!c->receiver) { + connectionList.first = c->nextConnectionList; delete c; continue; } QMutex *m = signalSlotLock(c->receiver); bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m); - c = connectionList[i]; + if (c->receiver) { *c->prev = c->next; if (c->next) c->next->prev = c->prev; @@ -815,6 +844,7 @@ QObject::~QObject() if (needToUnlock) m->unlock(); + connectionList.first = c->nextConnectionList; delete c; } } @@ -2412,11 +2442,11 @@ int QObject::receivers(const char *signal) const QMutexLocker locker(signalSlotLock(this)); if (d->connectionLists) { if (signal_index < d->connectionLists->count()) { - const QObjectPrivate::ConnectionList &connectionList = - d->connectionLists->at(signal_index); - for (int i = 0; i < connectionList.count(); ++i) { - const QObjectPrivate::Connection *c = connectionList.at(i); + const QObjectPrivate::Connection *c = + d->connectionLists->at(signal_index).first; + while (c) { receivers += c->receiver ? 1 : 0; + c = c->nextConnectionList; } } } @@ -2861,11 +2891,13 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, if (type & Qt::UniqueConnection) { QObjectConnectionListVector *connectionLists = s->d_func()->connectionLists; if (connectionLists && connectionLists->count() > signal_index) { - QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal_index]; - for (int i = 0; i < connectionList.count(); ++i) { - QObjectPrivate::Connection *c2 = connectionList.at(i); + const QObjectPrivate::Connection *c2 = + (*connectionLists)[signal_index].first; + + while (c2) { if (c2->receiver == receiver && c2->method == method_index) return false; + c2 = c2->nextConnectionList; } } type &= Qt::UniqueConnection - 1; @@ -2877,6 +2909,7 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, c->method = method_index; c->connectionType = type; c->argumentTypes = types; + c->nextConnectionList = 0; c->prev = &r->d_func()->senders; c->next = *c->prev; *c->prev = c; @@ -2926,9 +2959,9 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, if (signal_index < 0) { // remove from all connection lists for (signal_index = -1; signal_index < connectionLists->count(); ++signal_index) { - QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal_index]; - for (int i = 0; i < connectionList.count(); ++i) { - QObjectPrivate::Connection *c = connectionList[i]; + QObjectPrivate::Connection *c = + (*connectionLists)[signal_index].first; + while (c) { if (c->receiver && (r == 0 || (c->receiver == r && (method_index < 0 || c->method == method_index)))) { @@ -2937,7 +2970,6 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, if (!receiverMutex && senderMutex != m) { // need to relock this receiver and sender in the correct order needToUnlock = QOrderedMutexLocker::relock(senderMutex, m); - c = connectionList[i]; } if (c->receiver) { *c->prev = c->next; @@ -2952,12 +2984,13 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, success = true; connectionLists->dirty = true; } + c = c->nextConnectionList; } } } else if (signal_index < connectionLists->count()) { - QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal_index]; - for (int i = 0; i < connectionList.count(); ++i) { - QObjectPrivate::Connection *c = connectionList[i]; + QObjectPrivate::Connection *c = + (*connectionLists)[signal_index].first; + while (c) { if (c->receiver && (r == 0 || (c->receiver == r && (method_index < 0 || c->method == method_index)))) { @@ -2966,7 +2999,6 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, if (!receiverMutex && senderMutex != m) { // need to relock this receiver and sender in the correct order needToUnlock = QOrderedMutexLocker::relock(senderMutex, m); - c = connectionList[i]; } if (c->receiver) { *c->prev = c->next; @@ -2980,6 +3012,7 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, success = true; connectionLists->dirty = true; } + c = c->nextConnectionList; } } @@ -3144,9 +3177,14 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal signal = to_signal_index; continue; } - int count = connectionLists->at(signal).count(); - for (int i = 0; i < count; ++i) { - QObjectPrivate::Connection *c = connectionLists->at(signal)[i]; + + QObjectPrivate::Connection *c = connectionLists->at(signal).first; + if (!c) continue; + // We need to check against last here to ensure that signals added + // during the signal emission are not emitted in this emission. + QObjectPrivate::Connection *last = connectionLists->at(signal).last; + + do { if (!c->receiver) continue; @@ -3208,7 +3246,7 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal if (connectionLists->orphaned) break; - } + } while (c != last && (c = c->nextConnectionList) != 0); if (connectionLists->orphaned) break; @@ -3527,11 +3565,12 @@ void QObject::dumpObjectInfo() qDebug(" signal: %s", signal.signature()); // receivers - const QObjectPrivate::ConnectionList &connectionList = d->connectionLists->at(signal_index); - for (int i = 0; i < connectionList.count(); ++i) { - const QObjectPrivate::Connection *c = connectionList.at(i); + const QObjectPrivate::Connection *c = + d->connectionLists->at(signal_index).first; + while (c) { if (!c->receiver) { qDebug(" <Disconnected receiver>"); + c = c->nextConnectionList; continue; } const QMetaObject *receiverMetaObject = c->receiver->metaObject(); @@ -3540,6 +3579,7 @@ void QObject::dumpObjectInfo() receiverMetaObject->className(), c->receiver->objectName().isEmpty() ? "unnamed" : qPrintable(c->receiver->objectName()), method.signature()); + c = c->nextConnectionList; } } } else { diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 5d17bfd..4f8f1b9 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -113,12 +113,19 @@ public: int method; uint connectionType : 3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking QBasicAtomicPointer<int> argumentTypes; + // The next pointer for the singly-linked ConnectionList + Connection *nextConnectionList; //senders linked list Connection *next; Connection **prev; ~Connection(); }; - typedef QList<Connection *> ConnectionList; + // ConnectionList is a singly-linked list + struct ConnectionList { + ConnectionList() : first(0), last(0) {} + Connection *first; + Connection *last; + }; struct Sender { diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp index e5ca837..d21eee9 100644 --- a/src/corelib/statemachine/qhistorystate.cpp +++ b/src/corelib/statemachine/qhistorystate.cpp @@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE */ QHistoryStatePrivate::QHistoryStatePrivate() - : defaultState(0) + : defaultState(0), historyType(QHistoryState::ShallowHistory) { } @@ -135,8 +135,6 @@ QHistoryStatePrivate *QHistoryStatePrivate::get(QHistoryState *q) QHistoryState::QHistoryState(QState *parent) : QAbstractState(*new QHistoryStatePrivate, parent) { - Q_D(QHistoryState); - d->historyType = ShallowHistory; } /*! Constructs a new history state of the given \a type, with the given \a diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 20eb5ea..c43a26c 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE struct QPropertyAssignment { QPropertyAssignment() - : object(0) {} + : object(0), explicitlySet(true) {} QPropertyAssignment(QObject *o, const QByteArray &n, const QVariant &v, bool es = true) : object(o), propertyName(n), value(v), explicitlySet(es) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 9cb1d4d..5926176 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -209,6 +209,7 @@ QStateMachinePrivate::QStateMachinePrivate() processing = false; processingScheduled = false; stop = false; + stopProcessingReason = EventQueueEmpty; error = QStateMachine::NoError; globalRestorePolicy = QStateMachine::DoNotRestoreProperties; signalEventGenerator = 0; diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp index 114456d..ce229e0 100644 --- a/src/gui/dialogs/qfiledialog_win.cpp +++ b/src/gui/dialogs/qfiledialog_win.cpp @@ -63,6 +63,7 @@ #if !defined(Q_WS_WINCE) && !defined(Q_CC_MINGW) #include <shobjidl.h> #endif + #include <objbase.h> #if defined(__IFileDialog_INTERFACE_DEFINED__) \ diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index ebdac9a..1c45a58 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -95,7 +95,7 @@ bool QEglContext::chooseConfig do { // Get the number of matching configurations for this set of properties. EGLint matching = 0; - if (!eglChooseConfig(dpy, props.properties(), 0, 256, &matching) || !matching) + if (!eglChooseConfig(dpy, props.properties(), 0, 0, &matching) || !matching) continue; // If we want the best pixel format, then return the first diff --git a/src/gui/gui.pro b/src/gui/gui.pro index b77bfdc..a49d680 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -46,4 +46,3 @@ contains(DEFINES,QT_EVAL):include($$QT_SOURCE_TREE/src/corelib/eval.pri) QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist DEFINES += Q_INTERNAL_QAPP_SRC - diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index b9c36dc..baf2125 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -6,6 +6,8 @@ HEADERS += \ image/qbitmap.h \ image/qicon.h \ + image/qicon_p.h \ + image/qiconloader_p.h \ image/qiconengine.h \ image/qiconengineplugin.h \ image/qimage.h \ @@ -32,6 +34,7 @@ HEADERS += \ SOURCES += \ image/qbitmap.cpp \ image/qicon.cpp \ + image/qiconloader.cpp \ image/qimage.cpp \ image/qimageiohandler.cpp \ image/qimagereader.cpp \ diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index fa407c7..b7759e4 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -40,9 +40,11 @@ ****************************************************************************/ #include "qicon.h" +#include "qicon_p.h" #include "qiconengine.h" #include "qiconengineplugin.h" #include "private/qfactoryloader_p.h" +#include "private/qiconloader_p.h" #include "qapplication.h" #include "qstyleoption.h" #include "qpainter.h" @@ -50,6 +52,7 @@ #include "qstyle.h" #include "qpixmapcache.h" #include "qvariant.h" +#include "qcache.h" #include "qdebug.h" #ifdef Q_WS_MAC @@ -57,6 +60,11 @@ #include <private/qt_cocoa_helpers_mac_p.h> #endif +#ifdef Q_WS_X11 +#include "private/qt_x11_p.h" +#include "private/qkde_p.h" +#endif + QT_BEGIN_NAMESPACE /*! @@ -94,73 +102,14 @@ QT_BEGIN_NAMESPACE static QBasicAtomicInt serialNumCounter = Q_BASIC_ATOMIC_INITIALIZER(1); -class QIconPrivate -{ -public: - QIconPrivate(): engine(0), ref(1), serialNum(serialNumCounter.fetchAndAddRelaxed(1)), detach_no(0), engine_version(2), v1RefCount(0) {} - - ~QIconPrivate() { - if (engine_version == 1) { - if (!v1RefCount->deref()) { - delete engine; - delete v1RefCount; - } - } else if (engine_version == 2) { - delete engine; - } - } - - QIconEngine *engine; - - QAtomicInt ref; - int serialNum; - int detach_no; - int engine_version; - - QAtomicInt *v1RefCount; -}; - - -struct QPixmapIconEngineEntry +QIconPrivate::QIconPrivate() + : engine(0), ref(1), + serialNum(serialNumCounter.fetchAndAddRelaxed(1)), + detach_no(0), + engine_version(2), + v1RefCount(0) { - QPixmapIconEngineEntry():mode(QIcon::Normal), state(QIcon::Off){} - QPixmapIconEngineEntry(const QPixmap &pm, QIcon::Mode m = QIcon::Normal, QIcon::State s = QIcon::Off) - :pixmap(pm), size(pm.size()), mode(m), state(s){} - QPixmapIconEngineEntry(const QString &file, const QSize &sz = QSize(), QIcon::Mode m = QIcon::Normal, QIcon::State s = QIcon::Off) - :fileName(file), size(sz), mode(m), state(s){} - QPixmap pixmap; - QString fileName; - QSize size; - QIcon::Mode mode; - QIcon::State state; - bool isNull() const {return (fileName.isEmpty() && pixmap.isNull()); } -}; - -class QPixmapIconEngine : public QIconEngineV2 { -public: - QPixmapIconEngine(); - QPixmapIconEngine(const QPixmapIconEngine &); - ~QPixmapIconEngine(); - void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state); - QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state); - QPixmapIconEngineEntry *bestMatch(const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly); - QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state); - void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state); - void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state); - - // v2 functions - QString key() const; - QIconEngineV2 *clone() const; - bool read(QDataStream &in); - bool write(QDataStream &out) const; - void virtual_hook(int id, void *data); - -private: - QPixmapIconEngineEntry *tryMatch(const QSize &size, QIcon::Mode mode, QIcon::State state); - QVector<QPixmapIconEngineEntry> pixmaps; - - friend QDataStream &operator<<(QDataStream &s, const QIcon &icon); -}; +} QPixmapIconEngine::QPixmapIconEngine() { @@ -918,6 +867,146 @@ QList<QSize> QIcon::availableSizes(Mode mode, State state) const return engine->availableSizes(mode, state); } +/*! + \since 4.6 + + Sets the search paths for icon themes to \a paths. + \sa themeSearchPaths(), fromTheme() +*/ +void QIcon::setThemeSearchPaths(const QStringList &paths) +{ + QIconLoader::instance()->setThemeSearchPath(paths); +} + +/*! + \since 4.6 + + Returns the search paths for icon themes. + + The default value will depend on the platform: + + On X11, the search path will use the XDG_DATA_DIRS environment + variable if available. + + On Windows the search path defaults to [Application Directory]/icons + + On Mac the default search path will search in the + [Contents/Resources/icons] part of the application bundle. + + \sa setThemeSearchPaths(), fromTheme() +*/ +QStringList QIcon::themeSearchPaths() +{ + return QIconLoader::instance()->themeSearchPaths(); +} + +/*! + \since 4.6 + + Sets the current icon theme. + + The name should correspond to a directory name in the + current \ themeSearchPath() containing an index.theme + file describing it's contents.. + +*/ +void QIcon::setThemeName(const QString &path) +{ + QIconLoader::instance()->setThemeName(path); +} + +/*! + \since 4.6 + + Returns the name of the current icon theme. + + On X11, the current icon theme depends on your desktop + settings. On other platforms it is not set by default. + + \sa themeSearchPaths(), fromTheme(), hasThemeIcon() +*/ +QString QIcon::themeName() +{ + return QIconLoader::instance()->themeName(); +} + +/*! + \since 4.6 + + Returns the QIcon corresponding to \a name in the current + icon theme. If no such icon is found in the current theme + \a fallback is return instead. + + To use an icon theme on Windows or Mac, you will need to + bundle a compliant theme with your application and make sure + it is located in your themeSarchPaths. + + The lastest version of the freedesktop icon specification and naming + spesification can be obtained here: + http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html + http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html + + To fetch an icon from the current icon theme: + + \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 3 + + Or if you want to provide a guaranteed fallback for platforms that + do not support theme icons, you can use the second argument: + + \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 4 + + \note By default, only X11 will support themed icons. In order to + use themed icons on Mac and Windows, you will have to bundle a + compliant theme in one of your themeSearchPaths() and set the + appropriate themeName(). + + \sa themeName(), themeSearchPaths() +*/ +QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) +{ + + static QCache <QString, QIcon> iconCache; + + QIcon icon; + +#ifdef Q_WS_X11 + if (X11->desktopEnvironment == DE_KDE) { + icon = QKde::kdeIcon(name); + if (!icon.isNull()) + return icon; + } +#endif + + if (iconCache.contains(name)) { + icon = *iconCache.object(name); + } else { + QIcon *cachedIcon = new QIcon(new QIconLoaderEngine(name)); + iconCache.insert(name, cachedIcon); + icon = *cachedIcon; + } + + if (icon.availableSizes().isEmpty()) + return fallback; + + return icon; +} + +/*! + \since 4.6 + + Returns true if there is an icon available for a \a name in the current + icon theme, otherwise returns false. + + \sa themeSearchPaths(), fromTheme() +*/ +bool QIcon::hasThemeIcon(const QString &name) +{ + QIcon icon = fromTheme(name); + + return !icon.isNull(); +} + + /***************************************************************************** QIcon stream functions *****************************************************************************/ @@ -989,6 +1078,11 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon) QIconEngineV2 *engine = new QPixmapIconEngine; icon.d->engine = engine; engine->read(s); + } else if (key == QLatin1String("QIconLoaderEngine")) { + icon.d = new QIconPrivate; + QIconEngineV2 *engine = new QIconLoaderEngine(); + icon.d->engine = engine; + engine->read(s); #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) } else if (QIconEngineFactoryInterfaceV2 *factory = qobject_cast<QIconEngineFactoryInterfaceV2*>(loaderV2()->instance(key))) { if (QIconEngineV2 *engine= factory->create()) { diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h index c318e14..2a71717 100644 --- a/src/gui/image/qicon.h +++ b/src/gui/image/qicon.h @@ -97,6 +97,16 @@ public: QList<QSize> availableSizes(Mode mode = Normal, State state = Off) const; + static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon()); + static bool hasThemeIcon(const QString &name); + + static QStringList themeSearchPaths(); + static void setThemeSearchPaths(const QStringList &searchpath); + + static QString themeName(); + static void setThemeName(const QString &path); + + #ifdef QT3_SUPPORT enum Size { Small, Large, Automatic = Small }; static QT3_SUPPORT void setPixmapSize(Size which, const QSize &size); diff --git a/src/gui/image/qicon_p.h b/src/gui/image/qicon_p.h new file mode 100644 index 0000000..ccac4c3 --- /dev/null +++ b/src/gui/image/qicon_p.h @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QICON_P_H +#define QICON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtCore/qglobal.h> +#include <QtCore/qsize.h> +#include <QtCore/qlist.h> +#include <QtGui/qpixmap.h> +#include <QtGui/qicon.h> +#include <QtGui/qiconengine.h> + +QT_BEGIN_NAMESPACE + +class QIconPrivate +{ +public: + QIconPrivate(); + + ~QIconPrivate() { + if (engine_version == 1) { + if (!v1RefCount->deref()) { + delete engine; + delete v1RefCount; + } + } else if (engine_version == 2) { + delete engine; + } + } + + QIconEngine *engine; + + QAtomicInt ref; + int serialNum; + int detach_no; + int engine_version; + + QAtomicInt *v1RefCount; +}; + + +struct QPixmapIconEngineEntry +{ + QPixmapIconEngineEntry():mode(QIcon::Normal), state(QIcon::Off){} + QPixmapIconEngineEntry(const QPixmap &pm, QIcon::Mode m = QIcon::Normal, QIcon::State s = QIcon::Off) + :pixmap(pm), size(pm.size()), mode(m), state(s){} + QPixmapIconEngineEntry(const QString &file, const QSize &sz = QSize(), QIcon::Mode m = QIcon::Normal, QIcon::State s = QIcon::Off) + :fileName(file), size(sz), mode(m), state(s){} + QPixmap pixmap; + QString fileName; + QSize size; + QIcon::Mode mode; + QIcon::State state; + bool isNull() const {return (fileName.isEmpty() && pixmap.isNull()); } +}; + + + +class QPixmapIconEngine : public QIconEngineV2 { +public: + QPixmapIconEngine(); + QPixmapIconEngine(const QPixmapIconEngine &); + ~QPixmapIconEngine(); + void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state); + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state); + QPixmapIconEngineEntry *bestMatch(const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly); + QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state); + void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state); + void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state); + + // v2 functions + QString key() const; + QIconEngineV2 *clone() const; + bool read(QDataStream &in); + bool write(QDataStream &out) const; + void virtual_hook(int id, void *data); + +private: + QPixmapIconEngineEntry *tryMatch(const QSize &size, QIcon::Mode mode, QIcon::State state); + QVector<QPixmapIconEngineEntry> pixmaps; + + friend QDataStream &operator<<(QDataStream &s, const QIcon &icon); + friend class QIconThemeEngine; +}; + +QT_END_NAMESPACE + +#endif // QICON_P_H diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp new file mode 100644 index 0000000..2204ac9 --- /dev/null +++ b/src/gui/image/qiconloader.cpp @@ -0,0 +1,604 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <private/qiconloader_p.h> + +#include <private/qapplication_p.h> +#include <private/qicon_p.h> +#include <private/qkde_p.h> + +#include <QtGui/QIconEnginePlugin> +#include <QtGui/QPixmapCache> +#include <QtGui/QIconEngine> +#include <QtGui/QStyleOption> +#include <QtCore/QList> +#include <QtCore/QHash> +#include <QtCore/QDir> +#include <QtCore/QSettings> +#include <QtGui/QPainter> + +#ifdef Q_WS_MAC +#include <private/qt_cocoa_helpers_mac_p.h> +#endif + +#ifdef Q_WS_X11 +#include <private/qt_x11_p.h> +#include <private/gtksymbols_p.h> +#endif + +QT_BEGIN_NAMESPACE + +Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) + +static QString systemThemeName() +{ + QString result; +#ifdef Q_WS_X11 + if (X11->desktopEnvironment == DE_GNOME) { +#if defined(QT_NO_STYLE_GTK) + result = QLatin1String("gnome"); +#else + result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), + QLatin1String("gnome")); +#endif + } else if (X11->desktopEnvironment == DE_KDE) { + QString kdeDefault = X11->desktopVersion >= 4 ? + QString::fromLatin1("oxygen") : + QString::fromLatin1("crystalsvg"); + + QSettings settings(QKde::kdeHome() + + QLatin1String("/share/config/kdeglobals"), + QSettings::IniFormat); + + settings.beginGroup(QLatin1String("Icons")); + + result = settings.value(QLatin1String("Theme"), kdeDefault).toString(); + } +#endif + return result; +} + +static QString fallbackTheme() +{ + QString defaultTheme = systemThemeName(); + if (defaultTheme.isEmpty()) + defaultTheme = QLatin1String("hicolor"); + return defaultTheme; +} + +QIconLoader::QIconLoader() : + m_themeKey(1), m_supportsSvg(false) +{ + m_systemTheme = systemThemeName(); + + QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid, + QLatin1String("/iconengines"), + Qt::CaseInsensitive); + if (iconFactoryLoader.keys().contains(QLatin1String("svg"))) + m_supportsSvg = true; +} + +QIconLoader *QIconLoader::instance() +{ + return iconLoaderInstance(); +} + +// Queries the system theme and invalidates existing +// icons if the theme has changed. +void QIconLoader::updateSystemTheme() +{ + // Only change if this is not explicitly set by the user + if (m_userTheme.isEmpty()) { + QString theme = systemThemeName(); + if (theme != m_systemTheme) { + m_systemTheme = theme; + invalidateKey(); + } + } +} + +void QIconLoader::setThemeName(const QString &themeName) +{ + m_userTheme = themeName; + invalidateKey(); +} + +void QIconLoader::setThemeSearchPath(const QStringList &searchPaths) +{ + m_iconDirs = searchPaths; + themeList.clear(); + invalidateKey(); +} + +QStringList QIconLoader::themeSearchPaths() const +{ + if (m_iconDirs.isEmpty()) { + +#if defined(Q_WS_X11) + + QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); + if (xdgDirString.isEmpty()) + xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); + + QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); + + for (int i = 0 ; i < xdgDirs.size() ; ++i) { + QDir dir(xdgDirs[i]); + if (dir.exists()) + m_iconDirs.append(dir.path() + + QLatin1String("/icons")); + } + + if (X11->desktopEnvironment == DE_KDE) { + + m_iconDirs << QLatin1Char(':') + + QKde::kdeHome() + + QLatin1String("/share/icons"); + QStringList kdeDirs = + QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); + + for (int i = 0 ; i< kdeDirs.count() ; ++i) { + QDir dir(QLatin1Char(':') + kdeDirs.at(i) + + QLatin1String("/share/icons")); + if (dir.exists()) + m_iconDirs.append(dir.path()); + } + } + + // Add home directory first in search path + QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); + if (homeDir.exists()) + m_iconDirs.prepend(homeDir.path()); + +#elif defined(Q_WS_WIN) + m_iconDirs.append(qApp->applicationDirPath() + + QLatin1String("/icons")); +#elif defined(Q_WS_MAC) + m_iconDirs.append(qApp->applicationDirPath() + + QLatin1String("/../Resources/icons")); +#endif + } + return m_iconDirs; +} + +QIconTheme::QIconTheme(const QString &themeName) + : m_valid(false) +{ + QFile themeIndex; + + QList <QIconDirInfo> keyList; + QStringList iconDirs = QIcon::themeSearchPaths(); + for ( int i = 0 ; i < iconDirs.size() ; ++i) { + QDir iconDir(iconDirs[i]); + QString themeDir = iconDir.path() + QLatin1Char('/') + themeName; + themeIndex.setFileName(themeDir + QLatin1String("/index.theme")); + if (themeIndex.exists()) { + m_contentDir = themeDir; + m_valid = true; + break; + } + } + + if (themeIndex.exists()) { + const QSettings indexReader(themeIndex.fileName(), QSettings::IniFormat); + QStringListIterator keyIterator(indexReader.allKeys()); + while (keyIterator.hasNext()) { + + const QString key = keyIterator.next(); + if (key.endsWith(QLatin1String("/Size"))) { + // Note the QSettings ini-format does not accept + // slashes in key names, hence we have to cheat + if (int size = indexReader.value(key).toInt()) { + QString directoryKey = key.left(key.size() - 5); + QIconDirInfo dirInfo(directoryKey); + dirInfo.size = size; + QString type = indexReader.value(directoryKey + + QLatin1String("/Type") + ).toString(); + + if (type == QLatin1String("Fixed")) + dirInfo.type = QIconDirInfo::Fixed; + else if (type == QLatin1String("Scalable")) + dirInfo.type = QIconDirInfo::Scalable; + else + dirInfo.type = QIconDirInfo::Threshold; + + dirInfo.threshold = indexReader.value(directoryKey + + QLatin1String("/Threshold"), + 2).toInt(); + + dirInfo.minSize = indexReader.value(directoryKey + + QLatin1String("/MinSize"), + size).toInt(); + + dirInfo.maxSize = indexReader.value(directoryKey + + QLatin1String("/MaxSize"), + size).toInt(); + m_keyList.append(dirInfo); + } + } + } + + // Parent themes provide fallbacks for missing icons + m_parents = indexReader.value( + QLatin1String("Icon Theme/Inherits")).toStringList(); + + // Ensure a default platform fallback for all themes + if (m_parents.isEmpty()) + m_parents.append(fallbackTheme()); + + // Ensure that all themes fall back to hicolor + if (!m_parents.isEmpty()) + m_parents.append(QLatin1String("hicolor")); + } +} + +QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, + const QString &iconName, + QStringList &visited) const +{ + QThemeIconEntries entries; + Q_ASSERT(!themeName.isEmpty()); + + QPixmap pixmap; + + // Used to protect against potential recursions + visited << themeName; + + QIconTheme theme = themeList.value(themeName); + if (!theme.isValid()) { + theme = QIconTheme(themeName); + if (!theme.isValid()) + theme = fallbackTheme(); + + themeList.insert(themeName, theme); + } + + QString contentDir = theme.contentDir() + QLatin1Char('/'); + QList<QIconDirInfo> subDirs = theme.keyList(); + + const QString svgext(QLatin1String(".svg")); + const QString pngext(QLatin1String(".png")); + + // Add all relevant files + for (int i = 0; i < subDirs.size() ; ++i) { + const QIconDirInfo &dirInfo = subDirs.at(i); + QString subdir = dirInfo.path; + QDir currentDir(contentDir + subdir); + + if (dirInfo.type == QIconDirInfo::Scalable && m_supportsSvg && + currentDir.exists(iconName + svgext)) { + ScalableEntry *iconEntry = new ScalableEntry; + iconEntry->dir = dirInfo; + iconEntry->filename = currentDir.filePath(iconName + svgext); + entries.append(iconEntry); + + } else if (currentDir.exists(iconName + pngext)) { + PixmapEntry *iconEntry = new PixmapEntry; + iconEntry->dir = dirInfo; + iconEntry->filename = currentDir.filePath(iconName + pngext); + // Notice we ensure that pixmap entries allways come before + // scalable to preserve search order afterwards + entries.prepend(iconEntry); + } + } + + if (entries.isEmpty()) { + const QStringList parents = theme.parents(); + // Search recursively through inherited themes + for (int i = 0 ; i < parents.size() ; ++i) { + + const QString parentTheme = parents.at(i).trimmed(); + + if (!visited.contains(parentTheme)) // guard against recursion + entries = findIconHelper(parentTheme, iconName, visited); + + if (!entries.isEmpty()) // success + break; + } + } + return entries; +} + +QThemeIconEntries QIconLoader::loadIcon(const QString &name) const +{ + if (!themeName().isEmpty()) { + QStringList visited; + return findIconHelper(themeName(), name, visited); + } + + return QThemeIconEntries(); +} + + +// -------- Icon Loader Engine -------- // + + +QIconLoaderEngine::QIconLoaderEngine(const QString& iconName) + : m_iconName(iconName), m_key(0) +{ +} + +QIconLoaderEngine::~QIconLoaderEngine() +{ + while (!m_entries.isEmpty()) + delete m_entries.takeLast(); + Q_ASSERT(m_entries.size() == 0); +} + +QIconLoaderEngine::QIconLoaderEngine(const QIconLoaderEngine &other) + : QIconEngineV2(other), + m_iconName(other.m_iconName), + m_key(0) +{ +} + +QIconEngineV2 *QIconLoaderEngine::clone() const +{ + return new QIconLoaderEngine(*this); +} + +bool QIconLoaderEngine::read(QDataStream &in) { + in >> m_iconName; + return true; +} + +bool QIconLoaderEngine::write(QDataStream &out) const +{ + out << m_iconName; + return true; +} + +bool QIconLoaderEngine::hasIcon() const +{ + return !(m_entries.isEmpty()); +} + +// Lazily load the icon +void QIconLoaderEngine::ensureLoaded() +{ + if (!(iconLoaderInstance()->themeKey() == m_key)) { + + while (!m_entries.isEmpty()) + delete m_entries.takeLast(); + + Q_ASSERT(m_entries.size() == 0); + m_entries = iconLoaderInstance()->loadIcon(m_iconName); + m_key = iconLoaderInstance()->themeKey(); + } +} + +void QIconLoaderEngine::paint(QPainter *painter, const QRect &rect, + QIcon::Mode mode, QIcon::State state) +{ + QSize pixmapSize = rect.size(); +#if defined(Q_WS_MAC) + pixmapSize *= qt_mac_get_scalefactor(); +#endif + painter->drawPixmap(rect, pixmap(pixmapSize, mode, state)); +} + +/* + * This algorithm is defined by the freedesktop spec: + * http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html + */ +static bool directoryMatchesSize(const QIconDirInfo &dir, int iconsize) +{ + if (dir.type == QIconDirInfo::Fixed) { + return dir.size == iconsize; + + } else if (dir.type == QIconDirInfo::Scalable) { + return dir.size <= dir.maxSize && + iconsize >= dir.minSize; + + } else if (dir.type == QIconDirInfo::Threshold) { + return iconsize >= dir.size - dir.threshold && + iconsize <= dir.size + dir.threshold; + } + + Q_ASSERT(1); // Not a valid value + return false; +} + +/* + * This algorithm is defined by the freedesktop spec: + * http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html + */ +static int directorySizeDistance(const QIconDirInfo &dir, int iconsize) +{ + if (dir.type == QIconDirInfo::Fixed) { + return qAbs(dir.size - iconsize); + + } else if (dir.type == QIconDirInfo::Scalable) { + if (iconsize < dir.minSize) + return dir.minSize - iconsize; + else if (iconsize > dir.maxSize) + return iconsize - dir.maxSize; + else + return 0; + + } else if (dir.type == QIconDirInfo::Threshold) { + if (iconsize < dir.size - dir.threshold) + return dir.minSize - iconsize; + else if (iconsize > dir.size + dir.threshold) + return iconsize - dir.maxSize; + else return 0; + } + + Q_ASSERT(1); // Not a valid value + return INT_MAX; +} + +QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size) +{ + int iconsize = qMin(size.width(), size.height()); + + // Note that m_entries are sorted so that png-files + // come first + + // Search for exact matches first + for (int i = 0; i < m_entries.count(); ++i) { + QIconLoaderEngineEntry *entry = m_entries.at(i); + if (directoryMatchesSize(entry->dir, iconsize)) { + return entry; + } + } + + // Find the minimum distance icon + int minimalSize = INT_MAX; + QIconLoaderEngineEntry *closestMatch = 0; + for (int i = 0; i < m_entries.count(); ++i) { + QIconLoaderEngineEntry *entry = m_entries.at(i); + int distance = directorySizeDistance(entry->dir, iconsize); + if (distance < minimalSize) { + minimalSize = distance; + closestMatch = entry; + } + } + return closestMatch; +} + +/* + * Returns the actual icon size. For scalable svg's this is equivalent + * to the requested size. Otherwise the closest match is returned. + * + * todo: the spec is a bit fuzzy in this area, but we should probably + * allow scaling down pixmap icons as well. + * + */ +QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, + QIcon::State state) +{ + ensureLoaded(); + + QIconLoaderEngineEntry *entry = entryForSize(size); + if (entry) { + const QIconDirInfo &dir = entry->dir; + if (dir.type == QIconDirInfo::Scalable) + return size; + else + return QSize(dir.size, dir.size); + } + return QIconEngineV2::actualSize(size, mode, state); +} + +QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) +{ + Q_UNUSED(state); + + // Ensure that basePixmap is lazily initialized before generating the + // key, otherwise the cache key is not unique + if (basePixmap.isNull()) + basePixmap.load(filename); + + int actualSize = qMin(size.width(), size.height()); + QString key = QLatin1String("$qt_theme_") + + QString::number(basePixmap.cacheKey(), 16) + + QLatin1Char('_') + + QString::number(mode) + + QLatin1Char('_') + + QString::number(qApp->palette().cacheKey(), 16) + + QLatin1Char('_') + + QString::number(actualSize); + + QPixmap cachedPixmap; + if (QPixmapCache::find(key, &cachedPixmap)) { + return cachedPixmap; + } else { + QStyleOption opt(0); + opt.palette = qApp->palette(); + cachedPixmap = qApp->style()->generatedIconPixmap(mode, basePixmap, &opt); + QPixmapCache::insert(key, cachedPixmap); + } + return cachedPixmap; +} + +QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) +{ + if (svgIcon.isNull()) + svgIcon = QIcon(filename); + + // Simply reuse svg icon engine + return svgIcon.pixmap(size, mode, state); +} + +QPixmap QIconLoaderEngine::pixmap(const QSize &size, QIcon::Mode mode, + QIcon::State state) +{ + ensureLoaded(); + + QIconLoaderEngineEntry *entry = entryForSize(size); + if (entry) + return entry->pixmap(size, mode, state); + + return QPixmap(); +} + +QString QIconLoaderEngine::key() const +{ + return QLatin1String("QIconLoaderEngine"); +} + +void QIconLoaderEngine::virtual_hook(int id, void *data) +{ + ensureLoaded(); + + switch (id) { + case QIconEngineV2::AvailableSizesHook: + { + QIconEngineV2::AvailableSizesArgument &arg + = *reinterpret_cast<QIconEngineV2::AvailableSizesArgument*>(data); + const QList<QIconDirInfo> directoryKey = iconLoaderInstance()->theme().keyList(); + arg.sizes.clear(); + + // Gets all sizes from the DirectoryInfo entries + for (int i = 0 ; i < m_entries.size() ; ++i) { + int size = m_entries.at(i)->dir.size; + arg.sizes.append(QSize(size, size)); + } + } + break; + default: + QIconEngineV2::virtual_hook(id, data); + } +} + +QT_END_NAMESPACE diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h new file mode 100644 index 0000000..08d6cfe --- /dev/null +++ b/src/gui/image/qiconloader_p.h @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDESKTOPICON_P_H +#define QDESKTOPICON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtGui/QIcon> +#include <QtGui/QIconEngine> +#include <QtGui/QPixmapCache> +#include <private/qicon_p.h> +#include <private/qfactoryloader_p.h> +#include <QtCore/QHash> + +QT_BEGIN_NAMESPACE + +class QIconLoader; + +struct QIconDirInfo +{ + enum Type { Fixed, Scalable, Threshold }; + QIconDirInfo(const QString &_path = QString()) : + path(_path), + size(0), + maxSize(0), + minSize(0), + threshold(0), + type(Threshold) {} + QString path; + short size; + short maxSize; + short minSize; + short threshold; + Type type : 4; +}; + +class QIconLoaderEngineEntry + { +public: + virtual QPixmap pixmap(const QSize &size, + QIcon::Mode mode, + QIcon::State state) = 0; + QString filename; + QIconDirInfo dir; + static int count; +}; + +struct ScalableEntry : public QIconLoaderEngineEntry +{ + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state); + QIcon svgIcon; +}; + +struct PixmapEntry : public QIconLoaderEngineEntry +{ + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state); + QPixmap basePixmap; +}; + +typedef QList<QIconLoaderEngineEntry*> QThemeIconEntries; + +class QIconLoaderEngine : public QIconEngineV2 +{ +public: + QIconLoaderEngine(const QString& iconName = QString()); + ~QIconLoaderEngine(); + + void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state); + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state); + QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state); + QIconEngineV2 *clone() const; + bool read(QDataStream &in); + bool write(QDataStream &out) const; + +private: + QString key() const; + bool hasIcon() const; + void ensureLoaded(); + void virtual_hook(int id, void *data); + QIconLoaderEngineEntry *entryForSize(const QSize &size); + QIconLoaderEngine(const QIconLoaderEngine &other); + QThemeIconEntries m_entries; + QString m_iconName; + uint m_key; + + friend class QIconLoader; +}; + +class QIconTheme +{ +public: + QIconTheme(const QString &name); + QIconTheme() : m_valid(false) {}; + QStringList parents() { return m_parents; } + QList <QIconDirInfo> keyList() { return m_keyList; } + QString contentDir() { return m_contentDir; } + bool isValid() { return m_valid; } + +private: + QString m_contentDir; + QList <QIconDirInfo> m_keyList; + QStringList m_parents; + bool m_valid; +}; + +class QIconLoader : public QObject +{ +public: + QIconLoader(); + QThemeIconEntries loadIcon(const QString &iconName) const; + uint themeKey() const { return m_themeKey; } + + QString themeName() const { return m_userTheme.isEmpty() ? m_systemTheme : m_userTheme; } + void setThemeName(const QString &themeName); + QIconTheme theme() { return themeList.value(themeName()); } + void setThemeSearchPath(const QStringList &searchPaths); + QStringList themeSearchPaths() const; + QIconDirInfo dirInfo(int dirindex); + static QIconLoader *instance(); + void updateSystemTheme(); + void invalidateKey() { m_themeKey++; } + +private: + QThemeIconEntries findIconHelper(const QString &themeName, + const QString &iconName, + QStringList &visited) const; + uint m_themeKey; + bool m_supportsSvg; + + mutable QString m_userTheme; + mutable QString m_systemTheme; + mutable QStringList m_iconDirs; + mutable QHash <QString, QIconTheme> themeList; +}; + +QT_END_NAMESPACE + +#endif // QDESKTOPICON_P_H diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index 0f35ac1..06c345f 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/itemviews/qitemselectionmodel.cpp @@ -590,31 +590,43 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare emit q->currentColumnChanged(currentIndex, old); } - // update selectionsx - QModelIndex tl = model->index(start, 0, parent); - QModelIndex br = model->index(end, model->columnCount(parent) - 1, parent); - recursiveDeselect(QItemSelectionRange(tl, br)); - finalize(); -} - -void QItemSelectionModelPrivate::recursiveDeselect(const QItemSelectionRange &range) -{ - Q_Q(QItemSelectionModel); - - QItemSelection sel(range.topLeft(), range.bottomRight()); - q->select(sel, QItemSelectionModel::Deselect); - - QModelIndexList idxList = range.indexes(); - QModelIndexList::const_iterator it = idxList.begin(); - for (; it != idxList.end(); ++it) - { - if (!model->hasChildren(*it)) - continue; - - const QModelIndex &firstChild = it->child(0,0); - const QModelIndex &lastChild = it->child(model->rowCount(*it) - 1, model->columnCount(*it) - 1); - recursiveDeselect(QItemSelectionRange(firstChild, lastChild)); + QItemSelection deselected; + QItemSelection::iterator it = currentSelection.begin(); + while (it != currentSelection.end()) { + if (it->topLeft().parent() != parent) { // Check parents until reaching root or contained in range + QModelIndex itParent = it->topLeft().parent(); + while (itParent.isValid() && itParent.parent() != parent) + itParent = itParent.parent(); + + if (parent.isValid() && start <= itParent.row() && itParent.row() <= end) { + deselected.append(*it); + it = currentSelection.erase(it); + } else { + ++it; + } + } else if (start <= it->bottom() && it->bottom() <= end // Full inclusion + && start <= it->top() && it->top() <= end) { + deselected.append(*it); + it = currentSelection.erase(it); + } else if (start <= it->top() && it->top() <= end) { // Top intersection + deselected.append(QItemSelectionRange(it->topLeft(), model->index(end, it->left(), it->parent()))); + it = currentSelection.insert(it, QItemSelectionRange(model->index(end + 1, it->left(), it->parent()), + it->bottomRight())); + it = currentSelection.erase(++it); + } else if (start <= it->bottom() && it->bottom() <= end) { // Bottom intersection + deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()), it->bottomRight())); + it = currentSelection.insert(it, QItemSelectionRange(it->topLeft(), + model->index(start - 1, it->right(), it->parent()))); + it = currentSelection.erase(++it); + } else { + if (it->top() < start && end < it->bottom()) // Middle intersection (do nothing) + deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()), + model->index(end, it->left(), it->parent()))); + ++it; + } } + + emit q->selectionChanged(QItemSelection(), deselected); } /*! diff --git a/src/gui/itemviews/qitemselectionmodel_p.h b/src/gui/itemviews/qitemselectionmodel_p.h index 8176d4c..18ad506 100644 --- a/src/gui/itemviews/qitemselectionmodel_p.h +++ b/src/gui/itemviews/qitemselectionmodel_p.h @@ -77,8 +77,6 @@ public: void _q_layoutAboutToBeChanged(); void _q_layoutChanged(); - void recursiveDeselect(const QItemSelectionRange &range); - inline void remove(QList<QItemSelectionRange> &r) { QList<QItemSelectionRange>::const_iterator it = r.constBegin(); diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 2009499..8fc99a0 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -1197,17 +1197,16 @@ QModelIndex QTableView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifi visualRow = bottom; break; case MovePageUp: { - int top = 0; - while (top < bottom && d->isVisualRowHiddenOrDisabled(top, visualColumn)) - ++top; - int newRow = qMax(rowAt(visualRect(current).top() - d->viewport->height()), top); - return d->model->index(qBound(0, newRow, bottom), current.column(), d->root); + int newRow = rowAt(visualRect(current).top() - d->viewport->height()); + if (newRow == -1) + newRow = d->logicalRow(0); + return d->model->index(newRow, current.column(), d->root); } case MovePageDown: { - int newRow = qMin(rowAt(visualRect(current).bottom() + d->viewport->height()), bottom); - if (newRow < 0) - newRow = bottom; - return d->model->index(qBound(0, newRow, bottom), current.column(), d->root); + int newRow = rowAt(visualRect(current).bottom() + d->viewport->height()); + if (newRow == -1) + newRow = d->logicalRow(bottom); + return d->model->index(newRow, current.column(), d->root); }} int logicalRow = d->logicalRow(visualRow); diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index d5448db..45e6645 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -51,6 +51,9 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c #ifdef Q_WS_WINCE_WM #include <windowsm.h> #include <tpcshell.h> +#ifdef QT_WINCE_GESTURES +#include <gesture.h> +#endif #endif #include "qapplication.h" @@ -810,30 +813,41 @@ void qt_init(QApplicationPrivate *priv, int) ptrSetProcessDPIAware(); #endif + priv->GetGestureInfo = 0; + priv->GetGestureExtraArgs = 0; + +#if defined(Q_WS_WINCE_WM) && defined(QT_WINCE_GESTURES) + priv->GetGestureInfo = (PtrGetGestureInfo) &TKGetGestureInfo; + priv->GetGestureExtraArgs = (PtrGetGestureExtraArgs) &TKGetGestureExtraArguments; + priv->CloseGestureInfoHandle = (PtrCloseGestureInfoHandle) 0; + priv->SetGestureConfig = (PtrSetGestureConfig) 0; + priv->GetGestureConfig = (PtrGetGestureConfig) 0; +#elif !defined(Q_WS_WINCE) priv->GetGestureInfo = - (PtrGetGestureInfo)QLibrary::resolve(QLatin1String("user32"), - "GetGestureInfo"); + (PtrGetGestureInfo)QLibrary::resolve(QLatin1String("user32"), + "GetGestureInfo"); priv->GetGestureExtraArgs = - (PtrGetGestureExtraArgs)QLibrary::resolve(QLatin1String("user32"), - "GetGestureExtraArgs"); + (PtrGetGestureExtraArgs)QLibrary::resolve(QLatin1String("user32"), + "GetGestureExtraArgs"); priv->CloseGestureInfoHandle = - (PtrCloseGestureInfoHandle)QLibrary::resolve(QLatin1String("user32"), - "CloseGestureInfoHandle"); + (PtrCloseGestureInfoHandle)QLibrary::resolve(QLatin1String("user32"), + "CloseGestureInfoHandle"); priv->SetGestureConfig = - (PtrSetGestureConfig)QLibrary::resolve(QLatin1String("user32"), - "SetGestureConfig"); + (PtrSetGestureConfig)QLibrary::resolve(QLatin1String("user32"), + "SetGestureConfig"); priv->GetGestureConfig = - (PtrGetGestureConfig)QLibrary::resolve(QLatin1String("user32"), - "GetGestureConfig"); + (PtrGetGestureConfig)QLibrary::resolve(QLatin1String("user32"), + "GetGestureConfig"); priv->BeginPanningFeedback = - (PtrBeginPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"), - "BeginPanningFeedback"); + (PtrBeginPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"), + "BeginPanningFeedback"); priv->UpdatePanningFeedback = - (PtrUpdatePanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"), - "UpdatePanningFeedback"); + (PtrUpdatePanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"), + "UpdatePanningFeedback"); priv->EndPanningFeedback = (PtrEndPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"), "EndPanningFeedback"); +#endif } /***************************************************************************** @@ -1238,7 +1252,10 @@ void QApplication::beep() static void alert_widget(QWidget *widget, int duration) { -#ifndef Q_OS_WINCE +#ifdef Q_OS_WINCE + Q_UNUSED(widget); + Q_UNUSED(duration); +#else bool stopFlash = duration < 0; if (widget && (!widget->isActiveWindow() || stopFlash)) { @@ -3715,7 +3732,20 @@ bool QETWidget::translateGestureEvent(const MSG &msg) gi.cbSize = sizeof(GESTUREINFO); QApplicationPrivate *qAppPriv = QApplicationPrivate::instance(); - BOOL bResult = qAppPriv->GetGestureInfo((HANDLE)msg.lParam, &gi); +#if defined(Q_WS_WINCE_WM) && defined(QT_WINCE_GESTURES) +#undef GID_ZOOM +#define GID_ZOOM 0xf000 +#undef GID_ROTATE +#define GID_ROTATE 0xf001 +#undef GID_TWOFINGERTAP +#define GID_TWOFINGERTAP 0xf002 +#undef GID_ROLLOVER +#define GID_ROLLOVER 0xf003 +#endif + BOOL bResult = false; + if (qAppPriv->GetGestureInfo) + bResult = qAppPriv->GetGestureInfo((HANDLE)msg.lParam, &gi); + if (bResult) { const QPoint widgetPos = QPoint(gi.ptsLocation.x, gi.ptsLocation.y); QWidget *alienWidget = !internalWinId() ? this : childAt(widgetPos); @@ -3749,7 +3779,8 @@ bool QETWidget::translateGestureEvent(const MSG &msg) default: break; } - qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam); + if (qAppPriv->CloseGestureInfoHandle) + qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam); if (event.gestureType != QNativeGestureEvent::None) qt_sendSpontaneousEvent(widget, &event); } else { diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 32e7e3c..470b433 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -78,6 +78,7 @@ #include <private/qcrashhandler_p.h> #include <private/qcolor_p.h> #include <private/qcursor_p.h> +#include <private/qiconloader_p.h> #include "qstyle.h" #include "qmetaobject.h" #include "qtimer.h" @@ -870,28 +871,32 @@ bool QApplicationPrivate::x11_apply_settings() } // ### Fix properly for 4.6 - if (!(QApplicationPrivate::app_style && QApplicationPrivate::app_style->inherits("QGtkStyle"))) { + bool usingGtkSettings = QApplicationPrivate::app_style && QApplicationPrivate::app_style->inherits("QGtkStyle"); + if (!usingGtkSettings) { if (groupCount == QPalette::NColorGroups) QApplicationPrivate::setSystemPalette(pal); } if (!appFont) { - QFont font(QApplication::font()); - QString fontDescription; - // Override Qt font if KDE4 settings can be used - if (X11->desktopEnvironment == DE_KDE && X11->desktopVersion >= 4) { - QSettings kdeSettings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); - fontDescription = kdeSettings.value(QLatin1String("font")).toString(); - if (fontDescription.isEmpty()) { - // KDE stores fonts without quotes - fontDescription = kdeSettings.value(QLatin1String("font")).toStringList().join(QLatin1String(",")); + // ### Fix properly for 4.6 + if (!usingGtkSettings) { + QFont font(QApplication::font()); + QString fontDescription; + // Override Qt font if KDE4 settings can be used + if (X11->desktopVersion == 4) { + QSettings kdeSettings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); + fontDescription = kdeSettings.value(QLatin1String("font")).toString(); + if (fontDescription.isEmpty()) { + // KDE stores fonts without quotes + fontDescription = kdeSettings.value(QLatin1String("font")).toStringList().join(QLatin1String(",")); + } + } + if (fontDescription.isEmpty()) + fontDescription = settings.value(QLatin1String("font")).toString(); + if (!fontDescription .isEmpty()) { + font.fromString(fontDescription ); + QApplicationPrivate::setSystemFont(font); } - } - if (fontDescription.isEmpty()) - fontDescription = settings.value(QLatin1String("font")).toString(); - if (!fontDescription .isEmpty()) { - font.fromString(fontDescription ); - QApplicationPrivate::setSystemFont(font); } } @@ -1087,7 +1092,6 @@ static void qt_set_x11_resources(const char* font = 0, const char* fg = 0, if (QApplication::desktopSettingsAware()) { // first, read from settings QApplicationPrivate::x11_apply_settings(); - // the call to QApplication::style() below creates the system // palette, which breaks the logic after the RESOURCE_MANAGER // loop... so I have to save this value to be able to use it later @@ -1328,6 +1332,8 @@ static void qt_set_x11_resources(const char* font = 0, const char* fg = 0, QApplication::setEffectEnabled(Qt::UI_AnimateToolBox, effects.contains(QLatin1String("animatetoolbox"))); } + + QIconLoader::instance()->updateSystemTheme(); } diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index 7b445ea..765e503 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -811,15 +811,16 @@ void QX11Data::xdndHandleEnter(QWidget *, const XEvent * xe, bool /*passive*/) Atom type = XNone; int f; unsigned long n, a; - unsigned char *retval; + unsigned char *retval = 0; XGetWindowProperty(X11->display, qt_xdnd_dragsource_xid, ATOM(XdndTypelist), 0, qt_xdnd_max_type, False, XA_ATOM, &type, &f,&n,&a,&retval); - Atom *data = (Atom *)retval; - for (; j<qt_xdnd_max_type && j < (int)n; j++) { - qt_xdnd_types[j] = data[j]; - } - if (data) + if (retval) { + Atom *data = (Atom *)retval; + for (; j<qt_xdnd_max_type && j < (int)n; j++) { + qt_xdnd_types[j] = data[j]; + } XFree((uchar*)data); + } } else { // get the types from the message int i; diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp index 011c726..aba06d5 100644 --- a/src/gui/kernel/qguifunctions_wince.cpp +++ b/src/gui/kernel/qguifunctions_wince.cpp @@ -256,6 +256,31 @@ bool qt_wince_is_platform(const QString &platformString) { return false; } +int qt_wince_get_build() +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (GetVersionEx(&osvi)) { + return osvi.dwBuildNumber; + } + return 0; +} + +int qt_wince_get_version() +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (GetVersionEx(&osvi)) { + return (osvi.dwMajorVersion * 10 + osvi.dwMinorVersion); + } + return 0; +} + +bool qt_wince_is_windows_mobile_65() +{ + return ((qt_wince_get_version() == 52) && (qt_wince_get_build() > 2000)); +} + bool qt_wince_is_pocket_pc() { return qt_wince_is_platform(QString::fromLatin1("PocketPC")); } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index f705761..0dfc6e3 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6863,9 +6863,12 @@ void QWidgetPrivate::hide_helper() widgets that are not visible. - Widgets are hidden if they were created as independent - windows or as children of visible widgets, or if hide() or setVisible(false) was called. - + Widgets are hidden if: + \list + \o they were created as independent windows, + \o they were created as children of visible widgets, + \o hide() or setVisible(false) was called. + \endlist */ diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index f947ac1..2d8d6e2 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -60,6 +60,7 @@ #include <QtCore/QHash> #include <private/qapplication_p.h> +#include <private/qiconloader_p.h> #include <QtGui/QMenu> #include <QtGui/QStyle> @@ -341,9 +342,9 @@ static bool resolveGConf() typedef int (*x11ErrorHandler)(Display*, XErrorEvent*); -static QString getGConfString(const QString &value) +QString QGtk::getGConfString(const QString &value, const QString &fallback) { - QString retVal; + QString retVal = fallback; if (resolveGConf()) { g_type_init(); GConfClient* client = QGtk::gconf_client_get_default(); @@ -393,7 +394,7 @@ static QString getThemeName() // Fall back to gconf if (themeName.isEmpty() && resolveGConf()) - themeName = getGConfString(QLS("/desktop/gnome/interface/gtk_theme")); + themeName = QGtk::getGConfString(QLS("/desktop/gnome/interface/gtk_theme")); return themeName; } @@ -546,9 +547,13 @@ void QGtkStyleUpdateScheduler::updateTheme() { static QString oldTheme(QLS("qt_not_set")); QPixmapCache::clear(); + + QFont font = QGtk::getThemeFont(); + if (QApplication::font() != font) + qApp->setFont(font); + if (oldTheme != getThemeName()) { oldTheme = getThemeName(); - qApp->setFont(QGtk::getThemeFont()); QPalette newPalette = qApp->style()->standardPalette(); QApplicationPrivate::setSystemPalette(newPalette); QApplication::setPalette(newPalette); @@ -561,6 +566,7 @@ void QGtkStyleUpdateScheduler::updateTheme() QApplication::sendEvent(widget, &e); } } + QIconLoader::instance()->updateSystemTheme(); } static void add_widget(GtkWidget *widget) diff --git a/src/gui/styles/gtksymbols_p.h b/src/gui/styles/gtksymbols_p.h index 18c6dc5..68e970a 100644 --- a/src/gui/styles/gtksymbols_p.h +++ b/src/gui/styles/gtksymbols_p.h @@ -216,6 +216,7 @@ public: static QString openDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options); static QStringList openFilenames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options); + static QString getGConfString(const QString &key, const QString &fallback = QString()); static Ptr_gtk_container_forall gtk_container_forall; static Ptr_gtk_init gtk_init; diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 8f88781..1782e36 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -462,26 +462,6 @@ static const char * const qt_cleanlooks_checkbox_checked[] = { " ", " "}; -#ifdef Q_WS_X11 -extern "C" { - struct GConfClient; - struct GError; - typedef void (*Ptr_g_type_init)(); - typedef GConfClient* (*Ptr_gconf_client_get_default)(); - typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, GError **); - typedef void (*Ptr_g_object_unref)(void *); - typedef void (*Ptr_g_error_free)(GError *); - typedef void (*Ptr_g_free)(void*); -} - -static Ptr_g_type_init p_g_type_init = 0; -static Ptr_gconf_client_get_default p_gconf_client_get_default = 0; -static Ptr_gconf_client_get_string p_gconf_client_get_string = 0; -static Ptr_g_object_unref p_g_object_unref = 0; -static Ptr_g_error_free p_g_error_free = 0; -static Ptr_g_free p_g_free = 0; -#endif - static void qt_cleanlooks_draw_gradient(QPainter *painter, const QRect &rect, const QColor &gradientStart, const QColor &gradientStop, Direction direction = TopDown, QBrush bgBrush = QBrush()) { @@ -3848,17 +3828,6 @@ QSize QCleanlooksStyle::sizeFromContents(ContentsType type, const QStyleOption * void QCleanlooksStyle::polish(QApplication *app) { QWindowsStyle::polish(app); -#ifdef Q_WS_X11 - Q_D(QCleanlooksStyle); - - QString dataDirs = QLatin1String(getenv("XDG_DATA_DIRS")); - - if (dataDirs.isEmpty()) - dataDirs = QLatin1String("/usr/local/share/:/usr/share/"); - - dataDirs.prepend(QDir::homePath() + QLatin1String("/:")); - d->iconDirs = dataDirs.split(QLatin1Char(':')); -#endif } /*! @@ -4376,44 +4345,6 @@ QRect QCleanlooksStyle::subElementRect(SubElement sr, const QStyleOption *opt, c return r; } -void QCleanlooksStylePrivate::lookupIconTheme() const -{ -#ifdef Q_WS_X11 - - if (themeName.isEmpty()) { - //resolve glib and gconf functions - p_g_type_init = (Ptr_g_type_init)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, "g_type_init"); - p_gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLatin1String("gconf-2"), 4, "gconf_client_get_default"); - p_gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLatin1String("gconf-2"), 4, "gconf_client_get_string"); - p_g_object_unref = (Ptr_g_object_unref)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, "g_object_unref"); - p_g_error_free = (Ptr_g_error_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, "g_error_free"); - p_g_free = (Ptr_g_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, "g_free"); - - if (p_g_type_init && - p_gconf_client_get_default && - p_gconf_client_get_string && - p_g_object_unref && - p_g_error_free && - p_g_free) { - - p_g_type_init(); - GConfClient* client = p_gconf_client_get_default(); - GError *err = 0; - char *str = p_gconf_client_get_string(client, "/desktop/gnome/interface/icon_theme", &err); - if (!err) { - themeName = QString::fromUtf8(str); - p_g_free(str); - } - p_g_object_unref(client); - if (err) - p_g_error_free (err); - } - if (themeName.isEmpty()) - themeName = QLatin1String("gnome"); - } -#endif -} - /*! \internal */ @@ -4421,165 +4352,6 @@ QIcon QCleanlooksStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const { -#ifdef Q_WS_X11 - Q_D(const QCleanlooksStyle); - if (!QApplication::desktopSettingsAware()) - return QWindowsStyle::standardIconImplementation(standardIcon, option, widget); - QIcon icon; - QPixmap pixmap; - QPixmap link; - d->lookupIconTheme(); - switch (standardIcon) { - case SP_DirIcon: { - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - icon.addPixmap(proxy()->standardPixmap(SP_DirClosedIcon, option, widget), - QIcon::Normal, QIcon::Off); - pixmap = d->findIcon(16, QLatin1String("gnome-fs-directory.png")); - if (!pixmap.isNull()) - icon.addPixmap(pixmap, QIcon::Normal, QIcon::Off); - pixmap = d->findIcon(48, QLatin1String("gnome-fs-directory.png")); - if (!pixmap.isNull()) - icon.addPixmap(pixmap, QIcon::Normal, QIcon::Off); - pixmap = d->findIcon(16, QLatin1String("gnome-fs-directory-accept.png")); - if (!pixmap.isNull()) - icon.addPixmap(pixmap, QIcon::Normal, QIcon::On); - pixmap = d->findIcon(16, QLatin1String("gnome-fs-directory-accept.png")); - if (!pixmap.isNull()) - icon.addPixmap(pixmap, QIcon::Normal, QIcon::On); - } - break; - case SP_DirLinkIcon: - { - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - QPixmap link = d->findIcon(12, QLatin1String("emblem-symbolic-link.png")); - if (!link.isNull()) { - icon.addPixmap(proxy()->standardPixmap(SP_DirLinkIcon, option, widget)); - pixmap = d->findIcon(16, QLatin1String("gnome-fs-directory.png")); - if (!pixmap.isNull()) { - QPainter painter(&pixmap); - painter.drawPixmap(8, 8, 8, 8, link); - painter.end(); - icon.addPixmap(pixmap); - } - } - break; - } - case SP_FileIcon: - { - icon = d->createIcon(QLatin1String("unknown.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("gnome-fs-regular.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("stock_new.png")); - break; - } - case SP_DialogCloseButton: - { - icon = d->createIcon(QLatin1String("gtk-close.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("stock-close.png")); - break; - } - case SP_DirHomeIcon: - { - icon = d->createIcon(QLatin1String("folder_home.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("gnome_home.png")); - break; - } - case SP_DriveFDIcon: - { - icon = d->createIcon(QLatin1String("gnome-dev-floppy.png")); - break; - } - case SP_ComputerIcon: - { - icon = d->createIcon(QLatin1String("gnome-fs-client.png")); - break; - } - case SP_DesktopIcon: - { - icon = d->createIcon(QLatin1String("gnome-fs-desktop.png")); - break; - } - case SP_TrashIcon: - { - icon = d->createIcon(QLatin1String("gnome-fs-trash-empty.png")); - break; - } - case SP_DriveCDIcon: - case SP_DriveDVDIcon: - { - icon = d->createIcon(QLatin1String("gnome-dev-cdrom.png")); - break; - } - case SP_DriveHDIcon: - { - icon = d->createIcon(QLatin1String("gnome-dev-harddisk.png")); - break; - } - case SP_ArrowUp: - { - icon = d->createIcon(QLatin1String("stock_up.png")); - break; - } - case SP_ArrowDown: - { - icon = d->createIcon(QLatin1String("stock_down.png")); - break; - } - case SP_ArrowRight: - { - icon = d->createIcon(QLatin1String("stock_right.png")); - break; - } - case SP_ArrowLeft: - { - icon = d->createIcon(QLatin1String("stock_left.png")); - break; - } - case SP_BrowserReload: - { - icon = d->createIcon(QLatin1String("view-refresh.png")); - break; - } - case SP_BrowserStop: - { - pixmap = d->findIcon(24, QLatin1String("stop.png")); - break; - } - case SP_FileLinkIcon: - { - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - QPixmap link = d->findIcon(12, QLatin1String("emblem-symbolic-link.png")); - if (!link.isNull()) { - icon.addPixmap(proxy()->standardPixmap(SP_FileLinkIcon,option, widget)); - pixmap = d->findIcon(16, QLatin1String("unknown.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("stock_new.png")); - if (!pixmap.isNull()) { - QPainter painter(&pixmap); - painter.drawPixmap(8, 8, 8, 8, link); - painter.end(); - icon.addPixmap(pixmap); - } - } - break; - } - case SP_ArrowForward: - if (QApplication::layoutDirection() == Qt::RightToLeft) - return standardIconImplementation(SP_ArrowLeft, option, widget); - return standardIconImplementation(SP_ArrowRight, option, widget); - case SP_ArrowBack: - if (QApplication::layoutDirection() == Qt::RightToLeft) - return standardIconImplementation(SP_ArrowRight, option, widget); - return standardIconImplementation(SP_ArrowLeft, option, widget); - default: - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - } - if (!icon.isNull()) - return icon; -#endif // Q_WS_X11 return QWindowsStyle::standardIconImplementation(standardIcon, option, widget); } @@ -4589,341 +4361,10 @@ QIcon QCleanlooksStyle::standardIconImplementation(StandardPixmap standardIcon, QPixmap QCleanlooksStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const { -#ifdef Q_WS_X11 - Q_D(const QCleanlooksStyle); QPixmap pixmap; - if (!QApplication::desktopSettingsAware()) - return QWindowsStyle::standardPixmap(standardPixmap, opt, widget); - d->lookupIconTheme(); + #ifndef QT_NO_IMAGEFORMAT_XPM switch (standardPixmap) { - case SP_MessageBoxInformation: - { - pixmap = d->findIcon(48, QLatin1String("dialog-info.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(48, QLatin1String("stock_dialog-info.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MessageBoxWarning: - { - pixmap = d->findIcon(48, QLatin1String("dialog-warning.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(48, QLatin1String("stock_dialog-warning.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MessageBoxCritical: - { - pixmap = d->findIcon(48, QLatin1String("dialog-error.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(48, QLatin1String("stock_dialog-error.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MessageBoxQuestion: - { - pixmap = d->findIcon(48, QLatin1String("dialog-question.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DirHomeIcon: - { - pixmap = d->findIcon(16, QLatin1String("folder_home.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("gnome_home.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogOpenButton: - case SP_DirOpenIcon: - { - pixmap = d->findIcon(24, QLatin1String("stock_open.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_FileIcon: - { - pixmap = d->findIcon(24, QLatin1String("unknown.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("gnome-fs-regular.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("stock_new.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_FileLinkIcon: - { - pixmap = d->findIcon(24, QLatin1String("emblem-symbolic-link.png")); - if (!pixmap.isNull()) { - QPixmap fileIcon = d->findIcon(24, QLatin1String("unknown.png")); - if (fileIcon.isNull()) - fileIcon = d->findIcon(24, QLatin1String("stock_new.png")); - if (!fileIcon.isNull()) { - QPainter painter(&fileIcon); - painter.setRenderHint(QPainter::SmoothPixmapTransform); - painter.drawPixmap(12, 12, 12, 12, pixmap); - return fileIcon; - } - } - break; - } - case SP_DirClosedIcon: - case SP_DirIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-fs-directory.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DirLinkIcon: - { - pixmap = d->findIcon(24, QLatin1String("emblem-symbolic-link.png")); - if (!pixmap.isNull()) { - QPixmap dirIcon = d->findIcon(24, QLatin1String("gnome-fs-directory.png")); - if (!dirIcon.isNull()) { - QPainter painter(&dirIcon); - painter.setRenderHint(QPainter::SmoothPixmapTransform); - painter.drawPixmap(12, 12, 12, 12, pixmap); - return dirIcon; - } - } - break; - } - case SP_DriveFDIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-dev-floppy.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_ComputerIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-fs-client.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DesktopIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-fs-desktop.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_TrashIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-fs-trash-empty.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DriveCDIcon: - case SP_DriveDVDIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-dev-cdrom.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DriveHDIcon: - { - pixmap = d->findIcon(24, QLatin1String("gnome-dev-harddisk.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_FileDialogToParent: - { - pixmap = d->findIcon(16, QLatin1String("stock_up.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_FileDialogNewFolder: - { - pixmap = d->findIcon(16, QLatin1String("stock_new-dir.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_ArrowUp: - { - pixmap = d->findIcon(16, QLatin1String("stock_up.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_ArrowDown: - { - pixmap = d->findIcon(16, QLatin1String("stock_down.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_ArrowRight: - { - pixmap = d->findIcon(16, QLatin1String("stock_right.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_ArrowLeft: - { - pixmap = d->findIcon(16, QLatin1String("stock_left.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogCloseButton: - { - pixmap = d->findIcon(24, QLatin1String("gtk-close.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("stock-close.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogApplyButton: - { - pixmap = d->findIcon(24, QLatin1String("dialog-apply.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("stock-apply.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogResetButton: - { - pixmap = d->findIcon(24, QLatin1String("gtk-clear.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogHelpButton: - { - pixmap = d->findIcon(24, QLatin1String("gtk-help.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogOkButton: - { - pixmap = d->findIcon(24, QLatin1String("dialog-ok.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("stock-ok.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogCancelButton: - { - pixmap = d->findIcon(24, QLatin1String("dialog-cancel.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("stock-cancel.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(24, QLatin1String("process-stop.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_DialogSaveButton: - { - pixmap = d->findIcon(24, QLatin1String("stock_save.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_BrowserStop: - { - pixmap = d->findIcon(16, QLatin1String("process-stop.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_BrowserReload: - { - pixmap = d->findIcon(16, QLatin1String("view-refresh.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaPlay: - { - pixmap = d->findIcon(24, QLatin1String("media-playback-start.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaPause: - { - pixmap = d->findIcon(24, QLatin1String("media-playback-pause.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaStop: - { - pixmap = d->findIcon(24, QLatin1String("media-playback-stop.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaVolume: - { - pixmap = d->findIcon(16, QLatin1String("audio-volume-medium.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaVolumeMuted: - { - pixmap = d->findIcon(16, QLatin1String("audio-volume-muted.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaSeekForward: - { - pixmap = d->findIcon(24, QLatin1String("media-seek-forward.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaSeekBackward: - { - pixmap = d->findIcon(24, QLatin1String("media-seek-backward.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaSkipForward: - { - pixmap = d->findIcon(24, QLatin1String("media-skip-forward.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_MediaSkipBackward: - { - pixmap = d->findIcon(24, QLatin1String("media-skip-backward.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_TitleBarMenuButton: - case SP_TitleBarShadeButton: - case SP_TitleBarUnshadeButton: - case SP_TitleBarMaxButton: - case SP_TitleBarContextHelpButton: - return QWindowsStyle::standardPixmap(standardPixmap, opt, widget); case SP_TitleBarNormalButton: return QPixmap((const char **)dock_widget_restore_xpm); case SP_TitleBarMinButton: @@ -4936,7 +4377,7 @@ QPixmap QCleanlooksStyle::standardPixmap(StandardPixmap standardPixmap, const QS break; } #endif //QT_NO_IMAGEFORMAT_XPM -#endif //Q_WS_X11 + return QWindowsStyle::standardPixmap(standardPixmap, opt, widget); } diff --git a/src/gui/styles/qcleanlooksstyle_p.h b/src/gui/styles/qcleanlooksstyle_p.h index a26d40d..d325499 100644 --- a/src/gui/styles/qcleanlooksstyle_p.h +++ b/src/gui/styles/qcleanlooksstyle_p.h @@ -71,8 +71,6 @@ public: ~QCleanlooksStylePrivate() { } - - void lookupIconTheme() const; }; QT_END_NAMESPACE diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index c7feb25..3878856 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -840,176 +840,8 @@ static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbut #endif // QT_NO_TOOLBUTTON - #ifdef Q_WS_X11 // These functions are used to parse the X11 freedesktop icon spec -void QCommonStylePrivate::lookupIconTheme() const -{ - if (!themeName.isEmpty()) - return; - - QString dataDirs = QString::fromLocal8Bit(getenv("XDG_DATA_DIRS")); - if (dataDirs.isEmpty()) - dataDirs = QLatin1String("/usr/local/share/:/usr/share/"); - dataDirs += QLatin1Char(':') + QKde::kdeHome() + QLatin1String("/share"); - dataDirs.prepend(QDir::homePath() + QLatin1String("/:")); - QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'), QString::SkipEmptyParts); - foreach (const QString &dirName, kdeDirs) - dataDirs.append(QLatin1Char(':') + dirName + QLatin1String("/share")); - iconDirs = dataDirs.split(QLatin1Char(':')); - - QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde")); - QDir dir(fileInfo.canonicalFilePath()); - QString kdeDefault = (X11->desktopEnvironment != DE_KDE || X11->desktopVersion >= 4) - ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); - QString defaultTheme = fileInfo.exists() ? dir.dirName() : kdeDefault; - QSettings settings(QKde::kdeHome() + - QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); - settings.beginGroup(QLatin1String("Icons")); - themeName = settings.value(QLatin1String("Theme"), defaultTheme).toString(); -} - -QIconTheme QCommonStylePrivate::parseIndexFile(const QString &themeName) const -{ - Q_Q(const QCommonStyle); - QIconTheme theme; - QFile themeIndex; - QStringList parents; - QHash <int, QString> dirList; - - for ( int i = 0 ; i < iconDirs.size() && !themeIndex.exists() ; ++i) { - QString contentDir = QLatin1String(iconDirs[i].startsWith(QDir::homePath()) ? - "/.icons/" : "/icons/"); - themeIndex.setFileName(iconDirs[i] + contentDir + - themeName + QLatin1String("/index.theme")); - } - - if (themeIndex.open(QIODevice::ReadOnly | QIODevice::Text)) { - - QTextStream in(&themeIndex); - - while (!in.atEnd()) { - - QString line = in.readLine(); - - if (line.startsWith(QLatin1String("Inherits="))) { - line = line.right(line.length() - 9); - parents = line.split(QLatin1Char(',')); - } - - if (line.startsWith(QLatin1Char('['))) { - line = line.trimmed(); - line.chop(1); - QString dirName = line.right(line.length() - 1); - if (!in.atEnd()) { - line = in.readLine(); - int size; - if (line.startsWith(QLatin1String("Size="))) { - size = line.right(line.length() - 5).toInt(); - if (size) - dirList.insertMulti(size, dirName); - } - } - } - } - } - - if (q->inherits("QPlastiqueStyle")) { - QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde")); - QDir dir(fileInfo.canonicalFilePath()); - QString defaultKDETheme = dir.exists() ? dir.dirName() : QString::fromLatin1("crystalsvg"); - if (!parents.contains(defaultKDETheme) && themeName != defaultKDETheme) - parents.append(defaultKDETheme); - } else if (parents.isEmpty() && themeName != QLatin1String("hicolor")) { - parents.append(QLatin1String("hicolor")); - } - theme = QIconTheme(dirList, parents); - return theme; -} - -QPixmap QCommonStylePrivate::findIconHelper(int size, - const QString &themeName, - const QString &iconName, - QStringList &visited) const -{ - QPixmap pixmap; - - if (!themeName.isEmpty()) { - - visited << themeName; - QIconTheme theme = themeList.value(themeName); - - if (!theme.isValid()) { - theme = parseIndexFile(themeName); - themeList.insert(themeName, theme); - } - - if (!theme.isValid()) - return QPixmap(); - - QList <QString> subDirs = theme.dirList().values(size); - - for ( int i = 0 ; i < iconDirs.size() ; ++i) { - for ( int j = 0 ; j < subDirs.size() ; ++j) { - QString contentDir = (iconDirs[i].startsWith(QDir::homePath())) ? - QLatin1String("/.icons/") : QLatin1String("/icons/"); - QString fileName = iconDirs[i] + contentDir + themeName + QLatin1Char('/') + subDirs[j] + QLatin1Char('/') + iconName; - QFile file(fileName); - if (file.exists()) - pixmap.load(fileName); - if (!pixmap.isNull()) - break; - } - } - - if (pixmap.isNull()) { - QStringList parents = theme.parents(); - //search recursively through inherited themes - for (int i = 0 ; pixmap.isNull() && i < parents.size() ; ++i) { - QString parentTheme = parents[i].trimmed(); - if (!visited.contains(parentTheme)) //guard against endless recursion - pixmap = findIconHelper(size, parentTheme, iconName, visited); - } - } - } - return pixmap; -} - -/*! \internal - find a pixmap with the given size and name from the freedesktop theme. -*/ -QPixmap QCommonStylePrivate::findIcon(int size, const QString &name) const -{ - QIcon icon = QKde::kdeIcon(name); - if (!icon.isNull()) - return icon.pixmap(size); - - QPixmap pixmap; - QString pixmapName = QLatin1String("$qt") + name + QString::number(size); - - if (QPixmapCache::find(pixmapName, pixmap)) - return pixmap; - - if (!themeName.isEmpty()) { - QStringList visited; - pixmap = findIconHelper(size, themeName, name, visited); - } - QPixmapCache::insert(pixmapName, pixmap); - return pixmap; -} -/*! \internal - create an Icon from the freedesktop theme. - */ -QIcon QCommonStylePrivate::createIcon(const QString &name) const -{ - QIcon icon = QKde::kdeIcon(name); - if (icon.isNull()) { - icon.addPixmap(findIcon(16, name)); - icon.addPixmap(findIcon(24, name)); - icon.addPixmap(findIcon(32, name)); - } - return icon; -} /*!internal Checks if you are running KDE and looks up the toolbar @@ -4859,8 +4691,24 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid ret = int(QStyleHelper::dpiScaled(6.)); break; - case PM_TabBarIconSize: case PM_ToolBarIconSize: +#ifdef Q_WS_X11 + if (X11->desktopVersion >= 4) { + static int iconSize = 0; + if (!iconSize) { + QSettings settings(QKde::kdeHome() + + QLatin1String("/share/config/kdeglobals"), + QSettings::IniFormat); + settings.beginGroup(QLatin1String("ToolbarIcons")); + iconSize = settings.value(QLatin1String("Size"), QLatin1String("22")).toInt(); + } + ret = iconSize; + } else +#endif + ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); + break; + + case PM_TabBarIconSize: case PM_ListViewIconSize: ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); break; @@ -5371,293 +5219,161 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti Q_UNUSED(widget); Q_UNUSED(sp); #else -#ifdef Q_WS_X11 - Q_D(const QCommonStyle); QPixmap pixmap; - if (QApplication::desktopSettingsAware()) { - d->lookupIconTheme(); + + if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { switch (sp) { case SP_DirHomeIcon: - { - pixmap = d->findIcon(16, QLatin1String("folder_home.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("user-home")).pixmap(16); + break; case SP_MessageBoxInformation: - { - pixmap = d->findIcon(32, QLatin1String("messagebox_info.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("messagebox_info")).pixmap(16); + break; case SP_MessageBoxWarning: - { - pixmap = d->findIcon(32, QLatin1String("messagebox_warning.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("messagebox_warning")).pixmap(16); + break; case SP_MessageBoxCritical: - { - pixmap = d->findIcon(32, QLatin1String("messagebox_critical.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("messagebox_critical")).pixmap(16); + break; case SP_MessageBoxQuestion: - { - pixmap = d->findIcon(32, QLatin1String("help.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("help")).pixmap(16); + break; case SP_DialogOpenButton: case SP_DirOpenIcon: - { - pixmap = d->findIcon(16, QLatin1String("folder-open.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("folder_open.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } + pixmap = QIcon::fromTheme(QLatin1String("folder-open")).pixmap(16); + break; case SP_FileIcon: - { - pixmap = d->findIcon(16, QLatin1String("text-x-generic.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("empty.png")); - if (!pixmap.isNull()) - return pixmap; - break; - } - case SP_FileLinkIcon: - { - pixmap = d->findIcon(16, QLatin1String("link_overlay.png")); - if (!pixmap.isNull()) { - QPixmap fileIcon = d->findIcon(16, QLatin1String("text-x-generic.png")); - if (fileIcon.isNull()) - fileIcon = d->findIcon(16, QLatin1String("empty.png")); - if (!fileIcon.isNull()) { - QPainter painter(&fileIcon); - painter.drawPixmap(0, 0, 16, 16, pixmap); - return fileIcon; - } - } - break; - } + pixmap = QIcon::fromTheme(QLatin1String("text-x-generic"), + QIcon::fromTheme(QLatin1String("empty"))).pixmap(16); + break; case SP_DirClosedIcon: case SP_DirIcon: - { - pixmap = d->findIcon(16, QLatin1String("folder.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); break; - } - case SP_DirLinkIcon: - { - pixmap = d->findIcon(16, QLatin1String("link_overlay.png")); - if (!pixmap.isNull()) { - QPixmap dirIcon = d->findIcon(16, QLatin1String("folder.png")); - if (!dirIcon.isNull()) { - QPainter painter(&dirIcon); - painter.drawPixmap(0, 0, 16, 16, pixmap); - return dirIcon; - } - } - break; - } case SP_DriveFDIcon: - { - pixmap = d->findIcon(16, QLatin1String("media-floppy.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("3floppy_unmount.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-floppy"), + QIcon::fromTheme(QLatin1String("3floppy_unmount"))).pixmap(16); break; - } case SP_ComputerIcon: - { - pixmap = d->findIcon(16, QLatin1String("computer.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("system.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("computer"), + QIcon::fromTheme(QLatin1String("system"))).pixmap(16); break; - } case SP_DesktopIcon: - { - pixmap = d->findIcon(16, QLatin1String("user-desktop.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("desktop.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("user-desktop"), + QIcon::fromTheme(QLatin1String("desktop"))).pixmap(16); break; - } case SP_TrashIcon: - { - pixmap = d->findIcon(16, QLatin1String("user-trash.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("trashcan_empty.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("user-trash"), + QIcon::fromTheme(QLatin1String("trashcan_empty"))).pixmap(16); break; - } case SP_DriveCDIcon: case SP_DriveDVDIcon: - { - pixmap = d->findIcon(16, QLatin1String("media-optical.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("cdrom_unmount.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-optical"), + QIcon::fromTheme(QLatin1String("cdrom_unmount"))).pixmap(16); break; - } case SP_DriveHDIcon: - { - pixmap = d->findIcon(16, QLatin1String("drive-harddisk.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(16, QLatin1String("hdd_unmount.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("drive-harddisk"), + QIcon::fromTheme(QLatin1String("hdd_unmount"))).pixmap(16); break; - } case SP_FileDialogToParent: - { - pixmap = d->findIcon(32, QLatin1String("go-up.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(32, QLatin1String("up.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("go-up"), + QIcon::fromTheme(QLatin1String("up"))).pixmap(16); break; - } case SP_FileDialogNewFolder: - { - pixmap = d->findIcon(16, QLatin1String("folder_new.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("folder_new")).pixmap(16); break; - } case SP_ArrowUp: - { - pixmap = d->findIcon(32, QLatin1String("go-up.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(32, QLatin1String("up.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("go-up"), + QIcon::fromTheme(QLatin1String("up"))).pixmap(16); break; - } case SP_ArrowDown: - { - pixmap = d->findIcon(32, QLatin1String("go-down.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(32, QLatin1String("down.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("go-down"), + QIcon::fromTheme(QLatin1String("down"))).pixmap(16); break; - } case SP_ArrowRight: - { - pixmap = d->findIcon(32, QLatin1String("go-next.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(32, QLatin1String("forward.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("go-next"), + QIcon::fromTheme(QLatin1String("forward"))).pixmap(16); break; - } case SP_ArrowLeft: - { - pixmap = d->findIcon(32, QLatin1String("go-previous.png")); - if (pixmap.isNull()) - pixmap = d->findIcon(32, QLatin1String("back.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("go-previous"), + QIcon::fromTheme(QLatin1String("back"))).pixmap(16); break; - } case SP_FileDialogDetailedView: - { - pixmap = d->findIcon(16, QLatin1String("view_detailed.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("view_detailed")).pixmap(16); break; - } - case SP_FileDialogListView: - { - pixmap = d->findIcon(16, QLatin1String("view_icon.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("view_icon")).pixmap(16); break; - } case SP_BrowserReload: - { - pixmap = d->findIcon(32, QLatin1String("reload.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("reload")).pixmap(16); break; - } case SP_BrowserStop: - { - pixmap = d->findIcon(32, QLatin1String("stop.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(16); break; - } case SP_MediaPlay: - { - pixmap = d->findIcon(16, QLatin1String("player_play.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-playback-start")).pixmap(16); break; - } case SP_MediaPause: - { - pixmap = d->findIcon(16, QLatin1String("player_pause.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-playback-pause")).pixmap(16); break; - } case SP_MediaStop: - { - pixmap = d->findIcon(16, QLatin1String("player_stop.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-playback-stop")).pixmap(16); break; - } case SP_MediaSeekForward: - { - pixmap = d->findIcon(16, QLatin1String("player_fwd.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-seek-forward")).pixmap(16); break; - } case SP_MediaSeekBackward: - { - pixmap = d->findIcon(16, QLatin1String("player_rew.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16); break; - } case SP_MediaSkipForward: - { - pixmap = d->findIcon(16, QLatin1String("player_end.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); break; - } case SP_MediaSkipBackward: - { - pixmap = d->findIcon(16, QLatin1String("player_start.png")); - if (!pixmap.isNull()) - return pixmap; + pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); + break; + case SP_DialogResetButton: + pixmap = QIcon::fromTheme(QLatin1String("edit-clear")).pixmap(24); + break; + case SP_DialogHelpButton: + pixmap = QIcon::fromTheme(QLatin1String("help-contents")).pixmap(24); + break; + case SP_DialogCancelButton: + pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(24); + break; + case SP_DialogSaveButton: + pixmap = QIcon::fromTheme(QLatin1String("document-save")).pixmap(24); break; + case SP_FileLinkIcon: + pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); + if (!pixmap.isNull()) { + QPixmap fileIcon = QIcon::fromTheme(QLatin1String("text-x-generic")).pixmap(16); + if (fileIcon.isNull()) + fileIcon = QIcon::fromTheme(QLatin1String("empty")).pixmap(16); + if (!fileIcon.isNull()) { + QPainter painter(&fileIcon); + painter.drawPixmap(0, 0, 16, 16, pixmap); + return fileIcon; + } } - + break; + case SP_DirLinkIcon: + pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); + if (!pixmap.isNull()) { + QPixmap dirIcon = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); + if (!dirIcon.isNull()) { + QPainter painter(&dirIcon); + painter.drawPixmap(0, 0, 16, 16, pixmap); + return dirIcon; + } + } + break; default: break; } } -#endif //Q_WS_X11 + + if (!pixmap.isNull()) + return pixmap; #endif //QT_NO_IMAGEFORMAT_PNG switch (sp) { #ifndef QT_NO_IMAGEFORMAT_XPM @@ -5793,254 +5509,178 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons const QWidget *widget) const { QIcon icon; - if (QApplication::desktopSettingsAware()) { -#ifdef Q_WS_X11 - Q_D(const QCommonStyle); - d->lookupIconTheme(); - QPixmap pixmap; + if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { switch (standardIcon) { case SP_DirHomeIcon: - { - icon = d->createIcon(QLatin1String("folder_home.png")); + icon = QIcon::fromTheme(QLatin1String("user-home")); break; - } case SP_MessageBoxInformation: - { - icon = d->createIcon(QLatin1String("dialog-information.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("messagebox_info.png")); + icon = QIcon::fromTheme(QLatin1String("dialog-information")); break; - } case SP_MessageBoxWarning: - { - icon = d->createIcon(QLatin1String("dialog-warning.png")); - icon = d->createIcon(QLatin1String("dialog-warning.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("messagebox_warning.png")); + icon = QIcon::fromTheme(QLatin1String("dialog-warning")); break; - } case SP_MessageBoxCritical: - { - icon = d->createIcon(QLatin1String("dialog-error.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("messagebox_critical.png")); + icon = QIcon::fromTheme(QLatin1String("dialog-error")); break; - } case SP_MessageBoxQuestion: - { - icon = d->createIcon(QLatin1String("help.png")); + icon = QIcon::fromTheme(QLatin1String("dialog-question")); break; - } case SP_DialogOpenButton: case SP_DirOpenIcon: - { - icon = d->createIcon(QLatin1String("folder-open.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("folder_open.png")); + icon = QIcon::fromTheme(QLatin1String("folder-open")); break; - } case SP_FileIcon: - { - icon = d->createIcon(QLatin1String("text-x-generic.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("empty.png")); + icon = QIcon::fromTheme(QLatin1String("text-x-generic")); break; - } case SP_DirClosedIcon: case SP_DirIcon: - { - icon = d->createIcon(QLatin1String("folder.png")); + icon = QIcon::fromTheme(QLatin1String("folder")); break; - } case SP_DriveFDIcon: - { - icon = d->createIcon(QLatin1String("floppy_unmount.png")); + icon = QIcon::fromTheme(QLatin1String("floppy_unmount")); break; - } case SP_ComputerIcon: - { - icon = d->createIcon(QLatin1String("computer.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("system.png")); + icon = QIcon::fromTheme(QLatin1String("computer"), + QIcon::fromTheme(QLatin1String("system"))); break; - } case SP_DesktopIcon: - { - icon = d->createIcon(QLatin1String("user-desktop.png")); + icon = QIcon::fromTheme(QLatin1String("user-desktop")); break; - } case SP_TrashIcon: - { - icon = d->createIcon(QLatin1String("user-trash.png")); + icon = QIcon::fromTheme(QLatin1String("user-trash")); break; - } case SP_DriveCDIcon: case SP_DriveDVDIcon: - { - icon = d->createIcon(QLatin1String("media-optical.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("cdrom_unmount.png")); + icon = QIcon::fromTheme(QLatin1String("media-optical")); break; - } case SP_DriveHDIcon: - { - icon = d->createIcon(QLatin1String("drive-harddisk.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("hdd_unmount.png")); + icon = QIcon::fromTheme(QLatin1String("drive-harddisk")); break; - } case SP_FileDialogToParent: - { - icon = d->createIcon(QLatin1String("go-up.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("up.png")); + icon = QIcon::fromTheme(QLatin1String("go-up")); break; - } case SP_FileDialogNewFolder: - { - icon = d->createIcon(QLatin1String("folder_new.png")); + icon = QIcon::fromTheme(QLatin1String("folder-new")); break; - } case SP_ArrowUp: - { - icon = d->createIcon(QLatin1String("go-up.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("up.png")); + icon = QIcon::fromTheme(QLatin1String("go-up")); break; - } case SP_ArrowDown: - { - icon = d->createIcon(QLatin1String("go-down.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("down.png")); + icon = QIcon::fromTheme(QLatin1String("go-down")); break; - } case SP_ArrowRight: - { - icon = d->createIcon(QLatin1String("go-next.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("forward.png")); + icon = QIcon::fromTheme(QLatin1String("go-next")); break; - } case SP_ArrowLeft: - { - icon = d->createIcon(QLatin1String("go-previous.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("back.png")); + icon = QIcon::fromTheme(QLatin1String("go-previous")); + break; + case SP_DialogHelpButton: + icon = QIcon::fromTheme(QLatin1String("help-contents")); + break; + case SP_DialogCancelButton: + icon = QIcon::fromTheme(QLatin1String("process-stop")); + break; + case SP_DialogCloseButton: + icon = QIcon::fromTheme(QLatin1String("window-close")); + break; + case SP_DialogApplyButton: + icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply")); + break; + case SP_DialogOkButton: + icon = QIcon::fromTheme(QLatin1String("dialog-ok")); break; - } case SP_FileDialogDetailedView: - { - icon = d->createIcon(QLatin1String("view-list-details.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("view_detailed.png")); + icon = QIcon::fromTheme(QLatin1String("view-list-details")); break; - } case SP_FileDialogListView: - { - icon = d->createIcon(QLatin1String("view-list-icons.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("view_icon.png")); + icon = QIcon::fromTheme(QLatin1String("view-list-icons")); break; - } case SP_BrowserReload: - { - icon = d->createIcon(QLatin1String("view-refresh.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("reload.png")); + icon = QIcon::fromTheme(QLatin1String("view-refresh")); break; - } case SP_BrowserStop: - { - icon = d->createIcon(QLatin1String("process-stop.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("stop.png")); + icon = QIcon::fromTheme(QLatin1String("process-stop")); break; - } case SP_MediaPlay: - { - icon = d->createIcon(QLatin1String("media-playback-start.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_play.png")); + icon = QIcon::fromTheme(QLatin1String("media-playback-start")); break; - } case SP_MediaPause: - { - icon = d->createIcon(QLatin1String("media-playback-pause.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_pause.png")); + icon = QIcon::fromTheme(QLatin1String("media-playback-pause")); break; - } case SP_MediaStop: - { - icon = d->createIcon(QLatin1String("media-playback-stop.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_stop.png")); + icon = QIcon::fromTheme(QLatin1String("media-playback-stop")); break; - } case SP_MediaSeekForward: - { - icon = d->createIcon(QLatin1String("media-skip-forward.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_fwd.png")); + icon = QIcon::fromTheme(QLatin1String("media-seek-forward")); break; - } case SP_MediaSeekBackward: - { - icon = d->createIcon(QLatin1String("media-skip-backward.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_rew.png")); + icon = QIcon::fromTheme(QLatin1String("media-seek-backward")); break; - } case SP_MediaSkipForward: - { - icon = d->createIcon(QLatin1String("media-skip-forward.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_end.png")); + icon = QIcon::fromTheme(QLatin1String("media-skip-forward")); break; - } case SP_MediaSkipBackward: - { - icon = d->createIcon(QLatin1String("media-skip-backward.png")); - if (icon.isNull()) - icon = d->createIcon(QLatin1String("player_start.png")); + icon = QIcon::fromTheme(QLatin1String("media-skip-backward")); break; - } - - case SP_FileLinkIcon: { - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - QPixmap pixmap = d->findIcon(32, QLatin1String("link_overlay.png")); - if (!pixmap.isNull()) { - QPixmap fileIcon = d->findIcon(32, QLatin1String("text-x-generic.png")); - if (fileIcon.isNull()) - fileIcon = d->findIcon(32, QLatin1String("empty.png")); - if (!fileIcon.isNull()) { - QPainter painter(&fileIcon); - painter.drawPixmap(0, 0, 32, 32, pixmap); - icon.addPixmap(fileIcon); + case SP_MediaVolume: + icon = QIcon::fromTheme(QLatin1String("audio-volume-medium")); + break; + case SP_MediaVolumeMuted: + icon = QIcon::fromTheme(QLatin1String("audio-volume-muted")); + break; + case SP_DialogResetButton: + icon = QIcon::fromTheme(QLatin1String("edit-clear")); + break; + case SP_ArrowForward: + if (QApplication::layoutDirection() == Qt::RightToLeft) + return standardIconImplementation(SP_ArrowLeft, option, widget); + return standardIconImplementation(SP_ArrowRight, option, widget); + case SP_ArrowBack: + if (QApplication::layoutDirection() == Qt::RightToLeft) + return standardIconImplementation(SP_ArrowRight, option, widget); + return standardIconImplementation(SP_ArrowLeft, option, widget); + case SP_FileLinkIcon: + { + QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); + if (!linkIcon.isNull()) { + QIcon baseIcon = standardIconImplementation(SP_FileIcon, option, widget); + const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); + for (int i = 0 ; i < sizes.size() ; ++i) { + int size = sizes[i].width(); + QPixmap basePixmap = baseIcon.pixmap(size); + QPixmap linkPixmap = linkIcon.pixmap(size/2); + QPainter painter(&basePixmap); + painter.drawPixmap(size/2, size/2, linkPixmap); + icon.addPixmap(basePixmap); + } } } - } - break; - case SP_DirLinkIcon: { - icon = QIcon(proxy()->standardPixmap(standardIcon, option, widget)); - QPixmap pixmap = d->findIcon(32, QLatin1String("link_overlay.png")); - if (!pixmap.isNull()) { - QPixmap fileIcon = d->findIcon(32, QLatin1String("folder.png")); - if (!fileIcon.isNull()) { - QPainter painter(&fileIcon); - painter.drawPixmap(0, 0, 32, 32, pixmap); - icon.addPixmap(fileIcon); + break; + case SP_DirLinkIcon: + { + QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); + if (!linkIcon.isNull()) { + QIcon baseIcon = standardIconImplementation(SP_DirIcon, option, widget); + const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); + for (int i = 0 ; i < sizes.size() ; ++i) { + int size = sizes[i].width(); + QPixmap basePixmap = baseIcon.pixmap(size); + QPixmap linkPixmap = linkIcon.pixmap(size/2); + QPainter painter(&basePixmap); + painter.drawPixmap(size/2, size/2, linkPixmap); + icon.addPixmap(basePixmap); + } } - } } break; default: break; } + if (!icon.isNull()) return icon; -#elif defined(Q_WS_MAC) +#if defined(Q_WS_MAC) OSType iconType = 0; switch (standardIcon) { case QStyle::SP_MessageBoxQuestion: @@ -6131,11 +5771,9 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons ReleaseIconRef(overlayIcon); return retIcon; } - -#endif //Q_WS_X11 || Q_WS_MAC +#endif // Q_WS_MAC } - switch (standardIcon) { #ifndef QT_NO_IMAGEFORMAT_PNG case SP_FileDialogNewFolder: diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h index f2af5b2..cff46e6 100644 --- a/src/gui/styles/qcommonstyle_p.h +++ b/src/gui/styles/qcommonstyle_p.h @@ -122,20 +122,7 @@ public: } #endif mutable QIcon tabBarcloseButtonIcon; - -//icon detection on X11 -#ifdef Q_WS_X11 - void lookupIconTheme() const; int lookupToolButtonStyle() const; - QIcon createIcon(const QString &) const; - QPixmap findIcon(int size, const QString &) const; - QPixmap findIconHelper(int size, const QString &, const QString &, QStringList &visited) const; - QIconTheme parseIndexFile(const QString &themeName) const; - mutable QString themeName; - mutable QStringList iconDirs; - mutable QHash <QString, QIconTheme> themeList; -#endif - }; QT_END_NAMESPACE diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 660b4c3..5f56230 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1,4 +1,4 @@ -/******* ********************************************************************* +/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) @@ -3239,6 +3239,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, return newSize; } + /*! \reimp */ QPixmap QGtkStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, const QWidget *widget) const @@ -3271,65 +3272,80 @@ QPixmap QGtkStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, } break; - case SP_DialogDiscardButton: { + case SP_DialogDiscardButton: return QGtkPainter::getIcon(GTK_STOCK_DELETE); - } - - case SP_DialogOkButton: { + case SP_DialogOkButton: return QGtkPainter::getIcon(GTK_STOCK_OK); - } - - case SP_DialogCancelButton: { + case SP_DialogCancelButton: return QGtkPainter::getIcon(GTK_STOCK_CANCEL); - } - - case SP_DialogYesButton: { + case SP_DialogYesButton: return QGtkPainter::getIcon(GTK_STOCK_YES); - } - - case SP_DialogNoButton: { + case SP_DialogNoButton: return QGtkPainter::getIcon(GTK_STOCK_NO); - } - - case SP_DialogOpenButton: { + case SP_DialogOpenButton: return QGtkPainter::getIcon(GTK_STOCK_OPEN); - } - - case SP_DialogCloseButton: { + case SP_DialogCloseButton: return QGtkPainter::getIcon(GTK_STOCK_CLOSE); - } - - case SP_DialogApplyButton: { + case SP_DialogApplyButton: return QGtkPainter::getIcon(GTK_STOCK_APPLY); - } - - case SP_DialogSaveButton: { + case SP_DialogSaveButton: return QGtkPainter::getIcon(GTK_STOCK_SAVE); - } - - case SP_MessageBoxWarning: { + case SP_MessageBoxWarning: return QGtkPainter::getIcon(GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); - } - - case SP_MessageBoxQuestion: { + case SP_MessageBoxQuestion: return QGtkPainter::getIcon(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); - } - - case SP_MessageBoxInformation: { + case SP_MessageBoxInformation: return QGtkPainter::getIcon(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - } - - case SP_MessageBoxCritical: { + case SP_MessageBoxCritical: return QGtkPainter::getIcon(GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG); - } - default: return QCleanlooksStyle::standardPixmap(sp, option, widget); } + return pixmap; +} - return QPixmap(); +/*! + \internal +*/ +QIcon QGtkStyle::standardIconImplementation(StandardPixmap standardIcon, + const QStyleOption *option, + const QWidget *widget) const +{ + if (!QGtk::isThemeAvailable()) + return QCleanlooksStyle::standardIconImplementation(standardIcon, option, widget); + switch (standardIcon) { + case SP_DialogDiscardButton: + return QGtkPainter::getIcon(GTK_STOCK_DELETE); + case SP_DialogOkButton: + return QGtkPainter::getIcon(GTK_STOCK_OK); + case SP_DialogCancelButton: + return QGtkPainter::getIcon(GTK_STOCK_CANCEL); + case SP_DialogYesButton: + return QGtkPainter::getIcon(GTK_STOCK_YES); + case SP_DialogNoButton: + return QGtkPainter::getIcon(GTK_STOCK_NO); + case SP_DialogOpenButton: + return QGtkPainter::getIcon(GTK_STOCK_OPEN); + case SP_DialogCloseButton: + return QGtkPainter::getIcon(GTK_STOCK_CLOSE); + case SP_DialogApplyButton: + return QGtkPainter::getIcon(GTK_STOCK_APPLY); + case SP_DialogSaveButton: + return QGtkPainter::getIcon(GTK_STOCK_SAVE); + case SP_MessageBoxWarning: + return QGtkPainter::getIcon(GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); + case SP_MessageBoxQuestion: + return QGtkPainter::getIcon(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); + case SP_MessageBoxInformation: + return QGtkPainter::getIcon(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); + case SP_MessageBoxCritical: + return QGtkPainter::getIcon(GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG); + default: + return QCleanlooksStyle::standardIconImplementation(standardIcon, option, widget); + } } + /*! \reimp */ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const { diff --git a/src/gui/styles/qgtkstyle.h b/src/gui/styles/qgtkstyle.h index e12f175..f12de52 100644 --- a/src/gui/styles/qgtkstyle.h +++ b/src/gui/styles/qgtkstyle.h @@ -106,6 +106,10 @@ public: void unpolish(QWidget *widget); void unpolish(QApplication *app); + +protected Q_SLOTS: + QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, + const QWidget *widget = 0) const; }; diff --git a/src/gui/styles/qwindowscestyle.cpp b/src/gui/styles/qwindowscestyle.cpp index 997fc72..cd13dd8 100644 --- a/src/gui/styles/qwindowscestyle.cpp +++ b/src/gui/styles/qwindowscestyle.cpp @@ -1951,7 +1951,11 @@ QRect QWindowsCEStyle::subControlRect(ComplexControl control, const QStyleOption rect = QRect(x, y , bs.width(), bs.height()); break; case SC_SpinBoxEditField: - rect = QRect(lx, fw, rx-2, spinbox->rect.height() - 2*fw); + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) { + rect = QRect(lx, fw, spinbox->rect.width() - 2*fw - 2, spinbox->rect.height() - 2*fw); + } else { + rect = QRect(lx, fw, rx-2, spinbox->rect.height() - 2*fw); + } break; case SC_SpinBoxFrame: rect = spinbox->rect; diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp index c70b4c8..dc64241 100644 --- a/src/gui/styles/qwindowsmobilestyle.cpp +++ b/src/gui/styles/qwindowsmobilestyle.cpp @@ -75,8 +75,9 @@ #ifdef Q_WS_WINCE #include "qt_windows.h" #include "qguifunctions_wince.h" -extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp -extern bool qt_wince_is_smartphone(); //defined in qguifunctions_wince.cpp +extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp +extern bool qt_wince_is_smartphone(); //defined in qguifunctions_wince.cpp +extern bool qt_wince_is_windows_mobile_65(); //defined in qguifunctions_wince.cpp #endif // Q_WS_WINCE QT_BEGIN_NAMESPACE @@ -669,10 +670,3837 @@ static const char * const min_small_xpm[] = { " ++++++++++++ ", " "}; +#ifdef Q_WS_WINCE_WM + +static char * sbhandleup_xpm[] = { +"26 41 45 1", +" c None", +". c #000000", +"+ c #E7E7E7", +"@ c #D6D7D6", +"# c #949294", +"$ c #737573", +"% c #636563", +"& c #636163", +"* c #5A5D5A", +"= c #5A595A", +"- c #525552", +"; c #525152", +"> c #4A4D4A", +", c #7B797B", +"' c #CECFCE", +") c #CED3CE", +"! c #6B6D6B", +"~ c #6B696B", +"{ c #737173", +"] c #7B7D7B", +"^ c #848684", +"/ c #848284", +"( c #8C8A8C", +"_ c #8C8E8C", +": c #B5B2B5", +"< c #FFFFFF", +"[ c #949694", +"} c #B5B6B5", +"| c #9C9A9C", +"1 c #ADAEAD", +"2 c #9C9E9C", +"3 c #BDBABD", +"4 c #BDBEBD", +"5 c #F7F3F7", +"6 c #C6C3C6", +"7 c #C6C7C6", +"8 c #A5A2A5", +"9 c #CECBCE", +"0 c #FFFBFF", +"a c #ADAAAD", +"b c #A5A6A5", +"c c #D6D3D6", +"d c #B5BAB5", +"e c #DEDFDE", +"f c #DEDBDE", +"..........................", +"+@#$%%&&&**===---;;;;>=,'+", +"+@#$%%&&&**===---;;;;>=$'+", +")$!!~~%%&&&**===---;;;;>;'", +"#{$]],,$${{{!!~~%%%&&&*-;]", +"#{$]],,$${{{!!~~%%%&&&*-;]", +",$^//]],,$${{{!!~~%%%&&*;*", +",,(^^//]],$${!!!!!~~%%%&-*", +",,(^^//]],$${!!!!!~~%%%&-*", +"]]_((^^//]$!%%~!{{!!~~%%-*", +"//#__((^^]{:<<:~!{{{!!~~=*", +"//#__((^^]{:<<:~!{{{!!~~=&", +"//###__(/$:<<<<:~{${{!!~*&", +"^^[[##_^]:<<<<<<}!{$${{!*%", +"^^[[##_^]:<<<<<<}!{$${{!*%", +"((|[[#_/:<<<<<<<<}!$$${{&~", +"((||[#^1<<<<1:<<<<}!$$$$&~", +"((||[#^1<<<<1:<<<<}!$$$$&~", +"__2|#(1<<<<}],}<<<<}{$,$%~", +"##2|_1<<<<}^((]3<<<<}{$,~!", +"##2|_1<<<<}^((]3<<<<}{$,~!", +"##2#1<<<<3^###(/4<<<<}{,~{", +"##2#1<<<<3^###(/4<<<<}{,~!", +"[[2_5<<<4(#|[[#_/6<<<<,,!{", +"[|2_5<<4_[||||[[_/7<<<,]{$", +"[|2_5<<4_[||||[[_/7<<<,]{$", +"||8_5<6#|2222|||[_/9<<,]{$", +"228#06[28888222||[_/'<,/$,", +"228#06[28888222||[_/'<,/$,", +"22a|6[8bbbb88822||[(/c](,]", +"881b8baaabbbb88222|[(^(_,]", +"881b8baaabbbb88222|[(^(_,]", +"88111111aaabbb88822|[###]/", +"bb:::11111aaabbb8822||[[/^", +"bb:::11111aaabbb8822||[[//", +"bb:::::1111aaabbb8822||[/(", +"3a1::::::1111aaabb8822|_^8", +"da1::::::1111aaabb8822|_^8", +"e1aaabbbb888822||[[##__((@", +"+e4:aaabbbb88822||[[[#[b@+", +"+e4:aaabbbb88822||[[[#[bf+"}; + +static char * sbhandledown_xpm[] = { +"26 40 46 1", +" c None", +". c #E7E7E7", +"+ c #DEDFDE", +"@ c #BDBEBD", +"# c #B5B2B5", +"$ c #ADAAAD", +"% c #A5A6A5", +"& c #A5A2A5", +"* c #9C9E9C", +"= c #9C9A9C", +"- c #949694", +"; c #949294", +"> c #D6D7D6", +", c #DEDBDE", +"' c #D6DBD6", +") c #ADAEAD", +"! c #8C8E8C", +"~ c #8C8A8C", +"{ c #BDBABD", +"] c #848684", +"^ c #B5BAB5", +"/ c #848284", +"( c #848A84", +"_ c #7B7D7B", +": c #7B797B", +"< c #C6C3C6", +"[ c #D6D3D6", +"} c #FFFBFF", +"| c #CECFCE", +"1 c #FFFFFF", +"2 c #737573", +"3 c #F7F3F7", +"4 c #CECBCE", +"5 c #737173", +"6 c #C6C7C6", +"7 c #6B6D6B", +"8 c #B5B6B5", +"9 c #6B696B", +"0 c #636563", +"a c #636163", +"b c #5A5D5A", +"c c #5A595A", +"d c #525552", +"e c #525152", +"f c #4A4D4A", +"g c #C6CBC6", +".+@#$$$%%%%&&&**==---;-%>.", +".+@#$$$%%%%&&&**==---;-%,.", +"')$$$%%%%&&&&**==--;;!!~~>", +"{$)######))))$$$%%&&**=!]&", +"^$)######))))$$$%%&&**=!]&", +"%%#####))))$$$%%%&&**==-/(", +"%%###)))))$$$%%%&&**==--/]", +"%%###)))))$$$%%%&&**==--//", +"&&))))))$$$%%%&&&**=-;;;_/", +"&&)%&%$$$%%%%&&***=-~]~!:_", +"&&)%&%$$$%%%%&&***=-~]~!:_", +"**$=<-&%%%%&&&**==-~/[_~:_", +"**&;}<-*&&&&***==-!/|1:/2:", +"**&;}<-*&&&&***==-!/|1:/2:", +"==&!31<;=****===-!/411:_5:", +"-=*!311@!-====--!/6111:_52", +"-=*!311@!-====--!/6111:_52", +"--*!3111@~;=--;!/<1111::75", +";;*;)1111{];;;~/@111185:95", +";;*;)1111{];;;~/@111185:97", +";;*=!)11118]~~_{1111852:97", +";;*=!)11118]~~_{1111852:97", +"!!*=;~)11118_:81111852:207", +"~~==-;])1111)#1111872222a9", +"~~==-;])1111)#1111872222a9", +"~~=--;!/#111111118722255a0", +"]]--;;!]_#11111187522557b0", +"]]--;;!]_#11111187522557b0", +"//;;;!!~/2#1111#95255779ba", +"//;!!~~]]_5#11#975557799cb", +"//;!!~~]]_5#11#975557799ca", +"__!~~]]//_27009755779900db", +"::~]]//__:2257777799000adb", +"::~]]//__:2257777799000adb", +":2]//__::225557799000aabeb", +";52__::225557799000aaabde_", +";52__::225557799000aaabde_", +"[2779900aaabbcccdddeeeefeg", +".>;200aaabbcccdddeeeefc:|.", +".>;200aaabbcccdddeeeefc2|."}; + +static char * sbgripdown_xpm[] = { +"26 34 39 1", +" c None", +". c #949294", +"+ c #9C9E9C", +"@ c #9C9A9C", +"# c #949694", +"$ c #8C8E8C", +"% c #8C8A8C", +"& c #848684", +"* c #848284", +"= c #7B7D7B", +"- c #7B797B", +"; c #6B696B", +"> c #636563", +", c #737573", +"' c #636163", +") c #737173", +"! c #5A5D5A", +"~ c #6B6D6B", +"{ c #5A595A", +"] c #B5B6B5", +"^ c #BDBEBD", +"/ c #ADAEAD", +"( c #BDBABD", +"_ c #525552", +": c #313031", +"< c #525152", +"[ c #ADAAAD", +"} c #BDBAB5", +"| c #4A4D4A", +"1 c #4A494A", +"2 c #C6C3C6", +"3 c #C6CBC6", +"4 c #E7E7E7", +"5 c #DEDFDE", +"6 c #E7E3E7", +"7 c #DEE3DE", +"8 c #CECBCE", +"9 c #8C928C", +"0 c #CECFCE", +"..+++@@@###...$$%&&**==-;>", +"$.++@@@@##...$$%%&**==-->>", +"$$+@@@@###..$$%%&&*==--,>>", +"$$@@@@###..$$%%&&**==-,,>'", +"%%@@@###..$$$%&&**==--,,''", +"%%@@###..$$$%&&**==--,,)''", +"%%@###...$$%%&&*==--,,))'!", +"&&###...$$%%&&**==--,)))!!", +"&&##...$$%%&&**==--,,))~!!", +"&&#...$$%%&&**==--,,))~~!{", +"**...$$%%&&**==--,,))~~;!{", +"**..$$%%&&**===--,)))~~;{{", +"**.$$%%&]^&===//,,))~~;;{{", +"==$$%%&&]^*==-((,))~~;;>{_", +"==$%%&&***::--,,::~~;;;>__", +"==%%&&&**=::-,,)::~~;;>>__", +"--%&&&**==--,,)))~~;;>>>__", +"--&&&**==--,,)))~~;;>>>'_<", +",-&&**==]^-,))[[~;;>>>''<<", +",,&**==-]^-)))}};;>>>'''<<", +",,**==--,,::)~~;::>>'''!<<", +"))*==--,,)::~~;;::>'''!!<|", +"))==--,,)))~~;;;>>'''!!!||", +"))=--,,)))~~;;;>>'''!!!{||", +"~~--,,)))~~;;;>>'''!!!{{||", +"~~-,,)))~~;;>>>'''!!!{{{|1", +";;,,)))~~;;>>>'''!!!{{{_1<", +"~;,)))~~;;>>>'''!!!{{{__1'", +"%>~))~~;;>>>'''!!!{{{__|1$", +"2>>~~~;;>>>''!!!{{{{__<113", +"4%'';;;>>>''!!!{{{{__<11%4", +"45-!!'>>>''!!!{{{{_<|11)64", +"447+!{{___<<<||||1111|+444", +"444489~__<<<||||111>$04444"}; + +static char * sbgripup_xpm[] = { +"26 34 38 1", +" c None", +". c #E7E7E7", +"+ c #D6DBD6", +"@ c #C6C7C6", +"# c #B5B6B5", +"$ c #ADAEAD", +"% c #ADAAAD", +"& c #A5A6A5", +"* c #A5A2A5", +"= c #BDBEBD", +"- c #DEDFDE", +"; c #C6CBC6", +"> c #9C9E9C", +", c #E7E3E7", +"' c #BDBABD", +") c #B5B2B5", +"! c #9C9A9C", +"~ c #DEE3DE", +"{ c #949694", +"] c #D6D7D6", +"^ c #949294", +"/ c #DEDBDE", +"( c #8C8E8C", +"_ c #8C8A8C", +": c #848684", +"< c #D6D3CE", +"[ c #CECBCE", +"} c #D6D3D6", +"| c #848284", +"1 c #313031", +"2 c #7B7D7B", +"3 c #CECFCE", +"4 c #CECBC6", +"5 c #7B797B", +"6 c #737573", +"7 c #737173", +"8 c #6B6D6B", +"9 c #6B696B", +"....+@#$$%%%%&&&***$=-....", +"...;$$$$$%%%&&&&**>>>>@...", +".,'$$)#'#####)))$$$%*!!$~.", +".=$)#'''####))))$$$%%*!{'.", +"]$$''''#####)))$$$%%%&*{^/", +"=$#'''#####)))$$$$%%&&&!^#", +"$$'''#####))))$$$%%%&&*>(!", +"$$''#####))))$$$%%%&&&*>(^", +"$$######))))$$$$%%&&&**>(_", +"%$#####))))$$$$%%%&&***>__", +"%$####))))$$$$%%%&&&**>>__", +"%%###)))))$$$%%%&&&**>>>_:", +"%%##))))<])$$%[[&&***>>!::", +"%%#)))))<]$$%%}<&&**>>!!:|", +"&%)))))$$$11%%&&11*>>>!!:|", +"&&))))$$$$11%&&&11*>>!!{||", +"&&)))$$$$$%%%&&&**>>!!!{|2", +"&&))$$$$$%%%&&&**>>>!!{{|2", +"*&)$$$$$3]%&&&4@*>>!!{{{22", +"**$$$$$%3]%&&&<<>>!!!{{^25", +"**$$$$%%%%11&**>11!!{{^^25", +"**$$$%%%%&11***>11!!{{^^55", +"**$$%%%%&&&***>>!!!{{^^(55", +">>$%%%%&&&***>>>!!{{^^((56", +">>%%%%&&&&***>>!!!{{^^((66", +">>%%%&&&&***>>!!!{{^^((_67", +"!>%%&&&&***>>>!!{{{^^(__67", +"!!%&&&&***>>>!!!{{^^((_:77", +"!!&&&&***>>>!!!{{^^((__:77", +"!!&&&****>>!!!{{^^^(__::78", +"{!&&****>>>!!{{{^^((_::|88", +"{{&****>>>!!!{{^^((__:||88", +"{{****>>>!!!{{^^^(__::|289", +"{{***>>>!!!{{{^^((_::||289"}; + +static char * sbgripmiddle_xpm[] = { +"26 2 12 1", +" c None", +". c #949294", +"+ c #A5A2A5", +"@ c #9C9E9C", +"# c #9C9A9C", +"$ c #949694", +"% c #8C8E8C", +"& c #8C8A8C", +"* c #848684", +"= c #848284", +"- c #7B7D7B", +"; c #6B696B", +"..++@@@###$$$..%%&&*==--;;", +"..++@@@###$$$..%%&&*==--;;"}; + + +static char * listviewhighmiddle_xpm[] = { +"8 46 197 2", +" c None", +". c #66759E", +"+ c #6C789D", +"@ c #6A789E", +"# c #6B789E", +"$ c #6A779D", +"% c #6C789C", +"& c #6F7D9B", +"* c #6F7D9A", +"= c #9DB6EE", +"- c #9DB6ED", +"; c #9CB6ED", +"> c #A1B6EF", +", c #A2B6F0", +"' c #93AAE9", +") c #95ABEA", +"! c #94ABEA", +"~ c #94A9E8", +"{ c #8BA8EA", +"] c #8BA7EA", +"^ c #8AA7EA", +"/ c #8EAAE8", +"( c #8FAAE8", +"_ c #88A2E7", +": c #8CA3E8", +"< c #8BA3E7", +"[ c #8BA3E8", +"} c #8BA2E7", +"| c #8CA2E7", +"1 c #8DA2E7", +"2 c #87A1E8", +"3 c #87A1E9", +"4 c #86A0E8", +"5 c #86A1E7", +"6 c #87A2E7", +"7 c #859EE9", +"8 c #849DE9", +"9 c #869EE9", +"0 c #869FE9", +"a c #7C9BEA", +"b c #7C9CEA", +"c c #7B9CEA", +"d c #7C9BE9", +"e c #7E9CE9", +"f c #7B9AEA", +"g c #7C99E9", +"h c #7C9AEA", +"i c #7B9AE8", +"j c #7A9AEA", +"k c #7996E1", +"l c #7C96E4", +"m c #7B96E3", +"n c #7B95E3", +"o c #7E95E5", +"p c #7E95E6", +"q c #7292E1", +"r c #7490DF", +"s c #7591E0", +"t c #7590DF", +"u c #7392E1", +"v c #6D8CDE", +"w c #6F8EDD", +"x c #6E8DDD", +"y c #6E8DDE", +"z c #6F8EDE", +"A c #6E8EDE", +"B c #718EDD", +"C c #728EDD", +"D c #6B89E0", +"E c #6C89DF", +"F c #6D89E0", +"G c #6D89DF", +"H c #6C88DF", +"I c #6D88DF", +"J c #6D86DD", +"K c #6086E0", +"L c #6686E0", +"M c #6586E0", +"N c #6486E0", +"O c #6485E0", +"P c #6786DF", +"Q c #5F85E0", +"R c #6583DE", +"S c #6683DE", +"T c #6682DD", +"U c #6086DF", +"V c #5F86E0", +"W c #567ED7", +"X c #567ED8", +"Y c #557DD7", +"Z c #5A7FD8", +"` c #6281DA", +" . c #5379D9", +".. c #5278D9", +"+. c #547BD8", +"@. c #4C73D7", +"#. c #4B72D2", +"$. c #4C73D4", +"%. c #4C73D3", +"&. c #4B72D4", +"*. c #4F75D3", +"=. c #5074D2", +"-. c #4971D0", +";. c #4871D0", +">. c #335ECF", +",. c #325ECB", +"'. c #335ECD", +"). c #335ECE", +"!. c #325DCD", +"~. c #2E59C9", +"{. c #3059C9", +"]. c #2F59C9", +"^. c #2F59C8", +"/. c #2B59CA", +"(. c #3355C6", +"_. c #3354C5", +":. c #3156C7", +"<. c #3056C7", +"[. c #3355C7", +"}. c #3355C5", +"|. c #254EBF", +"1. c #1F51C1", +"2. c #234FC0", +"3. c #234FBF", +"4. c #2350C0", +"5. c #1E50BE", +"6. c #1D50C0", +"7. c #264DBE", +"8. c #264CBD", +"9. c #254DBE", +"0. c #244EBF", +"a. c #254DBF", +"b. c #234CBF", +"c. c #244CC0", +"d. c #244BC0", +"e. c #234BC0", +"f. c #234BBF", +"g. c #234CBE", +"h. c #2049B7", +"i. c #2A49B5", +"j. c #2749B5", +"k. c #2749B6", +"l. c #2D49B4", +"m. c #2649B6", +"n. c #2946B5", +"o. c #2A48B6", +"p. c #2947B5", +"q. c #2946B6", +"r. c #2848B6", +"s. c #2549B5", +"t. c #2648B6", +"u. c #2744B5", +"v. c #2744B4", +"w. c #2744AF", +"x. c #2543B4", +"y. c #2543B2", +"z. c #2442B2", +"A. c #2442B3", +"B. c #2442B5", +"C. c #2543B3", +"D. c #1F40B1", +"E. c #1E40B1", +"F. c #243EAE", +"G. c #273BAC", +"H. c #263DAC", +"I. c #253CAB", +"J. c #273CAB", +"K. c #273CAC", +"L. c #263BAA", +"M. c #253CAE", +"N. c #263BA6", +"O. c #253BA5", +"P. c #253AA5", +"Q. c #253BA6", +"R. c #253CA7", +"S. c #263AA6", +"T. c #243CA6", +"U. c #253CA5", +"V. c #273BA8", +"W. c #2F4DA4", +"X. c #2F4DA3", +"Y. c #1B2F85", +"Z. c #B5B5B6", +"`. c #B5B5B5", +" + c #B5B6B6", +".+ c #B5B4B6", +"++ c #C2C3C5", +"@+ c #C0C3C3", +"#+ c #C1C3C4", +"$+ c #E3E3E3", +"%+ c #E3E3E4", +"&+ c #E4E3E4", +"*+ c #E2E3E4", +"=+ c #ECEEEB", +"-+ c #EBEDEA", +";+ c #EEF0ED", +">+ c #EFF0EE", +". + @ @ # # $ % ", +"& & * & & & & & ", +"= = - = = ; > , ", +"' ) ! ! ! ) ' ~ ", +"{ ] { { { ^ / ( ", +"_ : < [ : } | 1 ", +"2 2 2 3 2 4 5 6 ", +"7 7 7 7 7 8 9 0 ", +"a b a a a c d e ", +"f g h h h h i j ", +"k l m m m n o p ", +"q q q q q q q q ", +"r r s s s t q u ", +"v w x y z A B C ", +"D E F F G F H I ", +"J K L M N O P Q ", +"R R S S S T U V ", +"W W X X X Y Z ` ", +" . . . . ...+.W ", +" . . . . ..... .", +"@.#.$.$.%.&.*.=.", +"-.-.;.-.-.-.-.-.", +">.,.'.).).!.!.>.", +"~.{.].^.].^././.", +"(.(.(.(.(._.:.<.", +"(.(.[.[.[.[.(.}.", +"|.1.2.3.3.4.5.6.", +"7.7.7.7.7.8.9.0.", +"a.b.c.d.c.e.f.g.", +"h.i.j.k.j.k.l.m.", +"n.o.p.q.r.p.s.t.", +"u.u.v.u.u.u.u.u.", +"w.x.y.z.A.y.B.C.", +"D.D.E.D.D.D.D.D.", +"D.D.E.D.D.D.D.D.", +"F.G.H.I.J.K.L.M.", +"N.N.O.N.N.P.Q.R.", +"N.N.S.N.N.N.N.N.", +"T.N.T.T.T.U.N.V.", +"W.W.X.W.W.W.W.W.", +"W.W.W.W.W.W.W.W.", +"Y.Y.Y.Y.Y.Y.Y.Y.", +"Z.`. + +.+Z.`.`.", +"++@+#+#+#+#+@+@+", +"$+%+&+&+*+%+%+%+", +"=+-+;+-+-+>+-+-+"}; + + + +static char * listviewhighcornerleft_xpm[] = { +"100 46 1475 2", +" c None", +". c #FBFBFC", +"+ c #E8EAE7", +"@ c #758DC3", +"# c #42599E", +"$ c #28418A", +"% c #19418F", +"& c #3F5695", +"* c #415896", +"= c #435A98", +"- c #445C99", +"; c #465E9B", +"> c #48609B", +", c #49629C", +"' c #4A639D", +") c #49639D", +"! c #4A629D", +"~ c #4B639D", +"{ c #4B649D", +"] c #4C659D", +"^ c #4D669D", +"/ c #4E689D", +"( c #506A9D", +"_ c #516A9D", +": c #536B9C", +"< c #546C9C", +"[ c #566D9B", +"} c #576D9B", +"| c #586E9C", +"1 c #5B6F9D", +"2 c #61739D", +"3 c #63749E", +"4 c #64749E", +"5 c #68769E", +"6 c #6A779E", +"7 c #6B789E", +"8 c #66759E", +"9 c #6C789D", +"0 c #EEF0ED", +"a c #D0D3DC", +"b c #3E51A3", +"c c #28428B", +"d c #29428C", +"e c #425996", +"f c #455C99", +"g c #485F9C", +"h c #49619E", +"i c #4A63A0", +"j c #4B64A1", +"k c #4B65A1", +"l c #4C66A2", +"m c #4D67A2", +"n c #4F69A1", +"o c #516AA1", +"p c #536CA0", +"q c #556DA1", +"r c #576EA0", +"s c #586F9F", +"t c #586E9F", +"u c #596F9E", +"v c #5A6F9E", +"w c #5C709E", +"x c #5E719E", +"y c #5F729F", +"z c #62739F", +"A c #63739E", +"B c #64749D", +"C c #65749E", +"D c #69769D", +"E c #6C799E", +"F c #6D799F", +"G c #707D9F", +"H c #717F9E", +"I c #6E7AA1", +"J c #6C789E", +"K c #6F7C9C", +"L c #6F7D9B", +"M c #2A4AA0", +"N c #4971D0", +"O c #4C72D8", +"P c #5472C0", +"Q c #5573BF", +"R c #5774BF", +"S c #5875BF", +"T c #5976C1", +"U c #5A76C1", +"V c #5C78C2", +"W c #5E7AC2", +"X c #607CC3", +"Y c #627EC3", +"Z c #637FC4", +"` c #6581C5", +" . c #6682C6", +".. c #6783C7", +"+. c #6984C8", +"@. c #6B85C9", +"#. c #6D87CA", +"$. c #6F89CB", +"%. c #718CCD", +"&. c #748ECF", +"*. c #7690D0", +"=. c #7992D2", +"-. c #7A93D3", +";. c #7C95D5", +">. c #7F98D7", +",. c #8099D8", +"'. c #859CDB", +"). c #8AA0DD", +"!. c #8DA3DF", +"~. c #8FA5E0", +"{. c #90A5E0", +"]. c #91A6E1", +"^. c #91A5E1", +"/. c #90A4E0", +"(. c #8EA3DE", +"_. c #92A6E2", +":. c #8FA4DF", +"<. c #90A5DE", +"[. c #90A5DC", +"}. c #90A6DB", +"|. c #91A6E0", +"1. c #93A7E2", +"2. c #95AAE6", +"3. c #99AEEA", +"4. c #9AB2EA", +"5. c #99B1E9", +"6. c #99B1E7", +"7. c #98AFE6", +"8. c #93A8E2", +"9. c #97ACE7", +"0. c #9AB3EB", +"a. c #9DB5ED", +"b. c #9DB6EE", +"c. c #375095", +"d. c #4056AD", +"e. c #506DCD", +"f. c #4360CC", +"g. c #345ED6", +"h. c #335ECF", +"i. c #355ED6", +"j. c #355FD6", +"k. c #365FD6", +"l. c #355FD0", +"m. c #3760D5", +"n. c #3A63D4", +"o. c #3C63D1", +"p. c #3B63CD", +"q. c #3B63C9", +"r. c #3B62C9", +"s. c #3D63C8", +"t. c #4065C5", +"u. c #4567C5", +"v. c #496BC5", +"w. c #4F70C7", +"x. c #5273C8", +"y. c #5475CA", +"z. c #5777CB", +"A. c #5879CD", +"B. c #5A7BCE", +"C. c #5D7DCF", +"D. c #5F7ECF", +"E. c #617FD0", +"F. c #6381D1", +"G. c #6583D2", +"H. c #6785D2", +"I. c #6886D3", +"J. c #6A88D4", +"K. c #6C89D5", +"L. c #6E8BD6", +"M. c #708CD7", +"N. c #718DD8", +"O. c #738EDA", +"P. c #748FDB", +"Q. c #7691DC", +"R. c #7893DD", +"S. c #7994DD", +"T. c #7A96DE", +"U. c #7B97DF", +"V. c #7C98E0", +"W. c #7E9AE2", +"X. c #7F9BE3", +"Y. c #829DE4", +"Z. c #849FE5", +"`. c #87A0E6", +" + c #88A1E7", +".+ c #89A2E6", +"++ c #8CA3E7", +"@+ c #8EA5E9", +"#+ c #8EA6E9", +"$+ c #8FA7E9", +"%+ c #8FA8E8", +"&+ c #8FA9E8", +"*+ c #91A9E8", +"=+ c #90A7E8", +"-+ c #8FA8EA", +";+ c #90AAEA", +">+ c #93ABEA", +",+ c #95ABEA", +"'+ c #93ABE9", +")+ c #94ABEA", +"!+ c #90A9EA", +"~+ c #93AAE9", +"{+ c #273E7E", +"]+ c #345ED5", +"^+ c #3D60CE", +"/+ c #3D60CF", +"(+ c #345ECF", +"_+ c #335ED0", +":+ c #355FD3", +"<+ c #3A60CE", +"[+ c #3A5FCB", +"}+ c #385FC9", +"|+ c #3B60C8", +"1+ c #3C63CB", +"2+ c #3E64CB", +"3+ c #4166CA", +"4+ c #4568C9", +"5+ c #4A6CC7", +"6+ c #4F71C8", +"7+ c #5172CA", +"8+ c #5475CE", +"9+ c #5678D3", +"0+ c #597CD6", +"a+ c #5C7ED7", +"b+ c #5E7FD8", +"c+ c #6181D9", +"d+ c #6383DA", +"e+ c #6585DA", +"f+ c #6786DB", +"g+ c #6988DC", +"h+ c #6B8ADD", +"i+ c #6D8BDE", +"j+ c #6F8DDE", +"k+ c #718EDF", +"l+ c #728FE0", +"m+ c #7390E1", +"n+ c #7390E2", +"o+ c #7491E3", +"p+ c #7592E4", +"q+ c #7693E4", +"r+ c #7794E5", +"s+ c #7894E5", +"t+ c #7995E6", +"u+ c #7B96E6", +"v+ c #7C97E7", +"w+ c #7D9AE8", +"x+ c #7F9CE9", +"y+ c #829DE9", +"z+ c #849EE9", +"A+ c #859EE9", +"B+ c #87A0E7", +"C+ c #8AA2E7", +"D+ c #8BA3E8", +"E+ c #89A2E7", +"F+ c #8CA6EA", +"G+ c #8BA6EA", +"H+ c #8BA7EA", +"I+ c #8CA3E8", +"J+ c #8BA8EA", +"K+ c #8CA7EA", +"L+ c #8CA8EA", +"M+ c #4659C7", +"N+ c #355ECF", +"O+ c #3660CF", +"P+ c #3860CE", +"Q+ c #3961CD", +"R+ c #3B61CB", +"S+ c #3B61CA", +"T+ c #3D62CA", +"U+ c #3D63CA", +"V+ c #4165CB", +"W+ c #456ACB", +"X+ c #4B6FCD", +"Y+ c #5174CE", +"Z+ c #5275D1", +"`+ c #5477D4", +" @ c #5678D9", +".@ c #587ADB", +"+@ c #597BDB", +"@@ c #5B7DDC", +"#@ c #5E7FDC", +"$@ c #6081DD", +"%@ c #6283DE", +"&@ c #6484DF", +"*@ c #6787E0", +"=@ c #6989E1", +"-@ c #6B8BE1", +";@ c #6D8DE2", +">@ c #6F8EE3", +",@ c #718FE4", +"'@ c #7290E4", +")@ c #7491E5", +"!@ c #7692E6", +"~@ c #7793E5", +"{@ c #7894E6", +"]@ c #7895E7", +"^@ c #7996E8", +"/@ c #7A97E8", +"(@ c #7B98E9", +"_@ c #7D99E8", +":@ c #7F9AE8", +"<@ c #7F9BE9", +"[@ c #7F9CEA", +"}@ c #859EE8", +"|@ c #859FE8", +"1@ c #85A0E9", +"2@ c #869FE9", +"3@ c #86A1E7", +"4@ c #86A0E9", +"5@ c #87A1E7", +"6@ c #88A2E7", +"7@ c #87A1E9", +"8@ c #5A6FCA", +"9@ c #365FCF", +"0@ c #345ED0", +"a@ c #385FCC", +"b@ c #385FCE", +"c@ c #3A61CC", +"d@ c #3B62CD", +"e@ c #3E64CD", +"f@ c #4167CF", +"g@ c #4469CF", +"h@ c #486CD1", +"i@ c #4D71D2", +"j@ c #5175D4", +"k@ c #5376D6", +"l@ c #5578DA", +"m@ c #5679DC", +"n@ c #587BDD", +"o@ c #5A7DDE", +"p@ c #5D80DE", +"q@ c #5F82DF", +"r@ c #6284DF", +"s@ c #6585E0", +"t@ c #6787E1", +"u@ c #6988E2", +"v@ c #6B8AE2", +"w@ c #6D8CE3", +"x@ c #6E8DE3", +"y@ c #708EE4", +"z@ c #718FE3", +"A@ c #7391E4", +"B@ c #7592E5", +"C@ c #7895E5", +"D@ c #7996E6", +"E@ c #7A97E6", +"F@ c #7B98E7", +"G@ c #7A98E8", +"H@ c #7B99E9", +"I@ c #7E9AE9", +"J@ c #7D9AE9", +"K@ c #7E9AEA", +"L@ c #809CE9", +"M@ c #819DE8", +"N@ c #7F9BEA", +"O@ c #819DE9", +"P@ c #819CE9", +"Q@ c #839EE9", +"R@ c #839EE8", +"S@ c #839DEA", +"T@ c #859FE9", +"U@ c #87A0E8", +"V@ c #86A0E8", +"W@ c #87A1E8", +"X@ c #3760CF", +"Y@ c #3A61CE", +"Z@ c #3A62CD", +"`@ c #3F66CE", +" # c #4368D0", +".# c #466CD2", +"+# c #496DD5", +"@# c #4E72D6", +"## c #5175D8", +"$# c #5276DA", +"%# c #5578DC", +"&# c #577ADC", +"*# c #597CDD", +"=# c #5B7DDD", +"-# c #5D7FDE", +";# c #5E81DE", +"># c #6183DF", +",# c #6386DF", +"'# c #6687E0", +")# c #6888E0", +"!# c #6A89E1", +"~# c #6C8AE1", +"{# c #6E8CE2", +"]# c #6F8DE2", +"^# c #7390E4", +"/# c #7390E3", +"(# c #7491E4", +"_# c #7693E5", +":# c #7895E6", +"<# c #7896E6", +"[# c #7997E7", +"}# c #7B97E7", +"|# c #7B98E8", +"1# c #7C98E8", +"2# c #7E9BE9", +"3# c #809CEA", +"4# c #819CEA", +"5# c #839DE9", +"6# c #365FD0", +"7# c #3660D0", +"8# c #3961CF", +"9# c #3B63CF", +"0# c #3D64D0", +"a# c #4067D0", +"b# c #4469D2", +"c# c #466BD3", +"d# c #496ED5", +"e# c #4C71D6", +"f# c #4E72D8", +"g# c #5074D9", +"h# c #5376DB", +"i# c #5578DB", +"j# c #587ADC", +"k# c #5B7CDC", +"l# c #5D7EDD", +"m# c #5F80DD", +"n# c #6081DE", +"o# c #6383DE", +"p# c #6686DF", +"q# c #6887E0", +"r# c #6988E0", +"s# c #6B89E1", +"t# c #6C8AE0", +"u# c #6E8CE1", +"v# c #708EE2", +"w# c #718FE2", +"x# c #7290E3", +"y# c #7391E2", +"z# c #7492E1", +"A# c #7592E2", +"B# c #7691E3", +"C# c #7591E3", +"D# c #7692E3", +"E# c #7693E3", +"F# c #7793E4", +"G# c #7893E4", +"H# c #7994E5", +"I# c #7D97E8", +"J# c #7E98E8", +"K# c #7D98E8", +"L# c #7D99E9", +"M# c #7D9BEA", +"N# c #7D9CEA", +"O# c #7E99E8", +"P# c #7D9AEA", +"Q# c #7C9BEA", +"R# c #7C9CEA", +"S# c #355FCF", +"T# c #3860D0", +"U# c #3A62D0", +"V# c #3C64D1", +"W# c #4167D1", +"X# c #4369D3", +"Y# c #466BD4", +"Z# c #486DD5", +"`# c #4A6ED7", +" $ c #4C70D8", +".$ c #5478D9", +"+$ c #577BDA", +"@$ c #597DDB", +"#$ c #5B7EDB", +"$$ c #5D7FDC", +"%$ c #6182DE", +"&$ c #6284DE", +"*$ c #6485DF", +"=$ c #6586DF", +"-$ c #6787DF", +";$ c #6888DF", +">$ c #6A8ADF", +",$ c #6C8BE0", +"'$ c #6D8CE0", +")$ c #6E8DE1", +"!$ c #6F8DE1", +"~$ c #708EE1", +"{$ c #718FE0", +"]$ c #728FE1", +"^$ c #7390E0", +"/$ c #738FE0", +"($ c #7490E1", +"_$ c #7590E1", +":$ c #7591E1", +"<$ c #7592E1", +"[$ c #7692E2", +"}$ c #7794E2", +"|$ c #7894E3", +"1$ c #7996E3", +"2$ c #7A96E5", +"3$ c #7B98E6", +"4$ c #7B9AE8", +"5$ c #7C99E8", +"6$ c #7C96E5", +"7$ c #7D97E7", +"8$ c #7C99E9", +"9$ c #7B9AE9", +"0$ c #7B9AEA", +"a$ c #5B6DCF", +"b$ c #305EC8", +"c$ c #335ECE", +"d$ c #305ECA", +"e$ c #345FCF", +"f$ c #3761D0", +"g$ c #3A62D1", +"h$ c #3C64D2", +"i$ c #4066D3", +"j$ c #466BD5", +"k$ c #486ED6", +"l$ c #4A6ED6", +"m$ c #4D71D8", +"n$ c #4F72D9", +"o$ c #5073D9", +"p$ c #4F72D8", +"q$ c #5074D8", +"r$ c #5276D9", +"s$ c #587ADA", +"t$ c #5B7CDB", +"u$ c #5D7EDC", +"v$ c #5F7FDD", +"w$ c #6081DC", +"x$ c #6182DD", +"y$ c #6283DD", +"z$ c #6484DE", +"A$ c #6585DD", +"B$ c #6787DE", +"C$ c #6988DF", +"D$ c #6A89DE", +"E$ c #6C8ADF", +"F$ c #6D8BDF", +"G$ c #6E8CE0", +"H$ c #6F8DE0", +"I$ c #718EE0", +"J$ c #728FDF", +"K$ c #728FDE", +"L$ c #7290E0", +"M$ c #7190E0", +"N$ c #7291E0", +"O$ c #7191E0", +"P$ c #7392E1", +"Q$ c #7493E1", +"R$ c #7594E1", +"S$ c #7594E2", +"T$ c #7694E2", +"U$ c #7695E2", +"V$ c #7A96E4", +"W$ c #7895E2", +"X$ c #7A96E2", +"Y$ c #7A96E3", +"Z$ c #7B96E3", +"`$ c #7996E1", +" % c #7C96E4", +".% c #305EC9", +"+% c #315ECC", +"@% c #325ECE", +"#% c #3760D0", +"$% c #3962D1", +"%% c #3E66D3", +"&% c #4268D4", +"*% c #446BD5", +"=% c #476CD6", +"-% c #496ED7", +";% c #4B6FD7", +">% c #4C70D7", +",% c #4E71D7", +"'% c #5074D7", +")% c #5276D8", +"!% c #5376D8", +"~% c #5779DA", +"{% c #597ADA", +"]% c #5A7BDB", +"^% c #5B7CDA", +"/% c #5D7EDB", +"(% c #5E7FDB", +"_% c #6182DB", +":% c #6384DC", +"<% c #6586DD", +"[% c #6686DC", +"}% c #6887DD", +"|% c #6988DD", +"1% c #6A8ADE", +"2% c #6B8BDE", +"3% c #6C8CDE", +"4% c #6E8DDF", +"5% c #6E8CDF", +"6% c #6D8DDF", +"7% c #6C8BDF", +"8% c #6F8DDF", +"9% c #718FDF", +"0% c #7290DF", +"a% c #7391E0", +"b% c #7491E0", +"c% c #7292E1", +"d% c #3959C5", +"e% c #345BC5", +"f% c #315EC8", +"g% c #355BC5", +"h% c #325EC8", +"i% c #315ECB", +"j% c #345DCC", +"k% c #335ECD", +"l% c #345ECD", +"m% c #355FCE", +"n% c #3862D0", +"o% c #3E66D2", +"p% c #456BD5", +"q% c #476CD5", +"r% c #4B6ED7", +"s% c #4B6FD6", +"t% c #4B6FD5", +"u% c #4D71D6", +"v% c #5073D7", +"w% c #5174D7", +"x% c #5275D8", +"y% c #5577D8", +"z% c #5678D8", +"A% c #5779D9", +"B% c #587AD8", +"C% c #597CD9", +"D% c #5B7DD9", +"E% c #5D7FDA", +"F% c #5F80DB", +"G% c #6182DC", +"H% c #6484DC", +"I% c #6585DC", +"J% c #6787DD", +"K% c #6988DE", +"L% c #6B8ADE", +"M% c #6B8ADF", +"N% c #6989DE", +"O% c #6B89DE", +"P% c #6E8BDF", +"Q% c #708CDE", +"R% c #708DDF", +"S% c #708FDF", +"T% c #728EDF", +"U% c #6F8EDD", +"V% c #728EDD", +"W% c #7390DF", +"X% c #7490DF", +"Y% c #335DC8", +"Z% c #3759C5", +"`% c #3859C5", +" & c #335EC8", +".& c #325DCA", +"+& c #345CCB", +"@& c #335DCC", +"#& c #345DCD", +"$& c #355FCD", +"%& c #3861D0", +"&& c #3B64D1", +"*& c #3E65D2", +"=& c #4168D3", +"-& c #456AD5", +";& c #4B6ED5", +">& c #4C6FD4", +",& c #4D70D5", +"'& c #4F72D6", +")& c #5173D6", +"!& c #5375D7", +"~& c #5476D8", +"{& c #5577D7", +"]& c #5477D8", +"^& c #5677D8", +"/& c #5879D9", +"(& c #597AD9", +"_& c #5C7DDA", +":& c #6080DC", +"<& c #6080DB", +"[& c #6181DC", +"}& c #6282DC", +"|& c #6383DD", +"1& c #6484DD", +"2& c #6686DE", +"3& c #6685DE", +"4& c #6786DE", +"5& c #6687DE", +"6& c #6887DE", +"7& c #6987DE", +"8& c #6788DF", +"9& c #6785DF", +"0& c #6B89DF", +"a& c #6C89DF", +"b& c #6F8DDD", +"c& c #6D8CDE", +"d& c #445BBB", +"e& c #3759BE", +"f& c #375AC6", +"g& c #355CC8", +"h& c #345CCA", +"i& c #355ECC", +"j& c #365FCD", +"k& c #3761CE", +"l& c #3A63D0", +"m& c #3D65D1", +"n& c #466AD4", +"o& c #476BD4", +"p& c #486CD3", +"q& c #4A6ED4", +"r& c #4B6ED4", +"s& c #4E71D6", +"t& c #4F71D5", +"u& c #5072D6", +"v& c #5274D7", +"w& c #5273D7", +"x& c #5274D6", +"y& c #5476D7", +"z& c #5779D8", +"A& c #587AD9", +"B& c #5A7CDA", +"C& c #5C7DDB", +"D& c #5D7EDA", +"E& c #6081DA", +"F& c #6181DB", +"G& c #6283DC", +"H& c #6483DD", +"I& c #6483DE", +"J& c #6585DE", +"K& c #6786DF", +"L& c #6886DE", +"M& c #6887DF", +"N& c #6987DF", +"O& c #6A88DF", +"P& c #6786E0", +"Q& c #6A86DE", +"R& c #6B89E0", +"S& c #365BC8", +"T& c #365CC8", +"U& c #375DCA", +"V& c #375FCB", +"W& c #3860CD", +"X& c #3C63D0", +"Y& c #4167D2", +"Z& c #4268D2", +"`& c #4368D2", +" * c #4367D2", +".* c #4568D2", +"+* c #466AD2", +"@* c #496CD3", +"#* c #4A6DD3", +"$* c #4A6DD4", +"%* c #4D70D4", +"&* c #4F72D5", +"** c #4C70D4", +"=* c #4E72D5", +"-* c #5173D5", +";* c #5375D6", +">* c #597BDA", +",* c #5B7DDA", +"'* c #5C7EDB", +")* c #5D7FDB", +"!* c #5E80DB", +"~* c #5E81DA", +"{* c #5F81DB", +"]* c #5F82DB", +"^* c #6384DD", +"/* c #6384DE", +"(* c #6585DF", +"_* c #6486E0", +":* c #6583DD", +"<* c #6386E0", +"[* c #6686E0", +"}* c #6B86DD", +"|* c #6D86DD", +"1* c #6086E0", +"2* c #5573CD", +"3* c #3959C3", +"4* c #3959C4", +"5* c #3759C0", +"6* c #375BC7", +"7* c #365CC7", +"8* c #395FCC", +"9* c #3B62CE", +"0* c #3E64D0", +"a* c #4066D1", +"b* c #4166D1", +"c* c #4064CF", +"d* c #4065CF", +"e* c #4266D0", +"f* c #4468D1", +"g* c #4569D1", +"h* c #476BD2", +"i* c #466AD1", +"j* c #476AD2", +"k* c #456AD1", +"l* c #496DD2", +"m* c #4A6FD3", +"n* c #496ED2", +"o* c #4B70D4", +"p* c #4D71D4", +"q* c #4E72D4", +"r* c #5073D4", +"s* c #5174D5", +"t* c #5175D5", +"u* c #5276D6", +"v* c #5377D6", +"w* c #5478D7", +"x* c #5579D7", +"y* c #567AD8", +"z* c #577BD9", +"A* c #597CD8", +"B* c #5A7DD9", +"C* c #5A7ED9", +"D* c #5B7FDA", +"E* c #5C80DA", +"F* c #5D80DA", +"G* c #5E81DB", +"H* c #5D80DB", +"I* c #6082DC", +"J* c #6183DD", +"K* c #6183DE", +"L* c #6082DB", +"M* c #6282DE", +"N* c #6682DE", +"O* c #6583DE", +"P* c #3759BF", +"Q* c #375AC2", +"R* c #375AC1", +"S* c #375AC4", +"T* c #395DCA", +"U* c #3A5ECA", +"V* c #3C60CC", +"W* c #3D61CD", +"X* c #3D61CC", +"Y* c #3C61CD", +"Z* c #3E62CD", +"`* c #3F64CE", +" = c #4266CF", +".= c #4468D0", +"+= c #4267CF", +"@= c #4166CE", +"#= c #4065CE", +"$= c #4166CD", +"%= c #4267CE", +"&= c #456AD0", +"*= c #4368CE", +"== c #4468CF", +"-= c #4569D0", +";= c #486BD1", +">= c #4B6FD3", +",= c #4C70D3", +"'= c #4F73D4", +")= c #5275D5", +"!= c #5477D6", +"~= c #577BD7", +"{= c #587CD8", +"]= c #577CD8", +"^= c #597DD9", +"/= c #5A7DDA", +"(= c #597DDA", +"_= c #587CDA", +":= c #5A7EDA", +"<= c #567BD8", +"[= c #557AD9", +"}= c #567BD9", +"|= c #577CD9", +"1= c #587DD9", +"2= c #587ED9", +"3= c #577ED8", +"4= c #587DD8", +"5= c #587ED8", +"6= c #567ED7", +"7= c #526ABD", +"8= c #3759C1", +"9= c #385BC7", +"0= c #395CC8", +"a= c #3B5DC9", +"b= c #3B5ECA", +"c= c #3A5FCA", +"d= c #3B60CC", +"e= c #3C61CC", +"f= c #3D62CD", +"g= c #3E63CD", +"h= c #3C61CB", +"i= c #3C61CA", +"j= c #3D62CB", +"k= c #3F64CC", +"l= c #4065CD", +"m= c #4669D0", +"n= c #476AD0", +"o= c #496BD1", +"p= c #4A6DD2", +"q= c #4B6ED2", +"r= c #4D71D3", +"s= c #4E73D4", +"t= c #4F74D4", +"u= c #5075D5", +"v= c #5276D5", +"w= c #5377D7", +"x= c #5278D7", +"y= c #5277D6", +"z= c #5378D7", +"A= c #5379D8", +"B= c #5379D9", +"C= c #5278D8", +"D= c #5178D7", +"E= c #3355C0", +"F= c #3556C1", +"G= c #395AC6", +"H= c #385AC7", +"I= c #395BC7", +"J= c #395EC9", +"K= c #395FCA", +"L= c #3B60CA", +"M= c #3B60CB", +"N= c #375DC7", +"O= c #385EC8", +"P= c #395FC9", +"Q= c #3A60CA", +"R= c #3D63CC", +"S= c #4367CF", +"T= c #476BD1", +"U= c #4A6ED2", +"V= c #4B6FD2", +"W= c #4C6FD2", +"X= c #4D70D1", +"Y= c #4E71D2", +"Z= c #4E72D2", +"`= c #4E74D4", +" - c #4E75D5", +".- c #4E75D4", +"+- c #4F75D3", +"@- c #5075D2", +"#- c #5075D3", +"$- c #5177D7", +"%- c #5178D8", +"&- c #4F75D5", +"*- c #5076D5", +"=- c #4F76D6", +"-- c #5279D9", +";- c #3C52B1", +">- c #3656C3", +",- c #3757C5", +"'- c #3758C6", +")- c #3759C6", +"!- c #375BC6", +"~- c #385CC7", +"{- c #385DC8", +"]- c #365CC6", +"^- c #355BC6", +"/- c #355CC6", +"(- c #365DC7", +"_- c #375EC8", +":- c #375CC6", +"<- c #385EC6", +"[- c #3A5FC7", +"}- c #3C60C8", +"|- c #3D61C9", +"1- c #3E62CA", +"2- c #4063CC", +"3- c #4165CE", +"4- c #4268D0", +"5- c #4269D1", +"6- c #436AD2", +"7- c #446AD2", +"8- c #456BD2", +"9- c #496CD1", +"0- c #4C6CD0", +"a- c #4D6CCF", +"b- c #4E6DD0", +"c- c #4F6ECF", +"d- c #4E6FCF", +"e- c #4C70CF", +"f- c #4A71D0", +"g- c #4F6FCF", +"h- c #4B71D0", +"i- c #4A72D1", +"j- c #4B73D4", +"k- c #4F70D0", +"l- c #4C73D3", +"m- c #4C73D6", +"n- c #4B72D2", +"o- c #4B71D1", +"p- c #4C73D7", +"q- c #3354C0", +"r- c #3152BE", +"s- c #3052BE", +"t- c #3051BF", +"u- c #2E4FBF", +"v- c #2E4FBE", +"w- c #2E50BF", +"x- c #2F50BF", +"y- c #3156C4", +"z- c #2F56C5", +"A- c #2E57C5", +"B- c #2F57C5", +"C- c #3057C6", +"D- c #3258C6", +"E- c #3459C7", +"F- c #365AC7", +"G- c #385BC8", +"H- c #3B5DCA", +"I- c #3B5DCB", +"J- c #3C5ECC", +"K- c #3C60CD", +"L- c #3C62CE", +"M- c #3D65D0", +"N- c #3D66D1", +"O- c #4166D2", +"P- c #4667D2", +"Q- c #4A67D1", +"R- c #4C68D0", +"S- c #4C69CF", +"T- c #4D6BCE", +"U- c #4E6DCD", +"V- c #4E6ECE", +"W- c #4E6DCE", +"X- c #4970D0", +"Y- c #4770D0", +"Z- c #4B6BCE", +"`- c #4A6CCE", +" ; c #496DCF", +".; c #476FD0", +"+; c #4870D0", +"@; c #486DCF", +"#; c #242F79", +"$; c #2F41AC", +"%; c #2040B8", +"&; c #2041B8", +"*; c #2243B3", +"=; c #2243B8", +"-; c #2343B8", +";; c #2444B8", +">; c #2445B8", +",; c #2445B6", +"'; c #2445B7", +"); c #2444B9", +"!; c #2949BE", +"~; c #2649BF", +"{; c #234BBF", +"]; c #224CBF", +"^; c #224AC0", +"/; c #244CC0", +"(; c #254DC0", +"_; c #254DC1", +":; c #264DC2", +"<; c #274EC3", +"[; c #274CC3", +"}; c #274DC4", +"|; c #254DC5", +"1; c #214EC5", +"2; c #204FC6", +"3; c #1F50C8", +"4; c #2151C9", +"5; c #2B53C8", +"6; c #3154C7", +"7; c #3255C6", +"8; c #2F57C7", +"9; c #2C58C9", +"0; c #2D59CA", +"a; c #2D58C9", +"b; c #2E5BCC", +"c; c #325ECC", +"d; c #325ECB", +"e; c #1F40B1", +"f; c #1F40B2", +"g; c #1F40B3", +"h; c #2A44BD", +"i; c #2845BE", +"j; c #2745BE", +"k; c #2646BF", +"l; c #2546BE", +"m; c #2347BF", +"n; c #2147BF", +"o; c #2048C0", +"p; c #1D48C0", +"q; c #1C48C0", +"r; c #1B47C0", +"s; c #1C48BF", +"t; c #1E49BE", +"u; c #214ABD", +"v; c #244CBD", +"w; c #264DBE", +"x; c #254EC0", +"y; c #214FC2", +"z; c #1B51C5", +"A; c #1C51C7", +"B; c #2250C8", +"C; c #2A52C8", +"D; c #3254C6", +"E; c #3355C5", +"F; c #3154C8", +"G; c #3355C6", +"H; c #2F57C8", +"I; c #2E58C9", +"J; c #2E59C9", +"K; c #3059C9", +"L; c #2040B6", +"M; c #2743BB", +"N; c #2844BC", +"O; c #2743BD", +"P; c #2844BE", +"Q; c #2844BD", +"R; c #2346BE", +"S; c #2047BF", +"T; c #1E48C0", +"U; c #1D47C0", +"V; c #1D49BF", +"W; c #1F49BF", +"X; c #204ABE", +"Y; c #254DBF", +"Z; c #234EC0", +"`; c #2050C1", +" > c #1C51C3", +".> c #1F51C6", +"+> c #2651C8", +"@> c #2D53C7", +"#> c #3155C6", +"$> c #3155C7", +"%> c #3355C7", +"&> c #3254C7", +"*> c #1E40B1", +"=> c #2141B8", +"-> c #2442B9", +";> c #2744BB", +">> c #2945BB", +",> c #2A45BB", +"'> c #2944BA", +")> c #2745BB", +"!> c #2545BC", +"~> c #2246BD", +"{> c #2047BE", +"]> c #1F47BD", +"^> c #1D48BE", +"/> c #1E49C0", +"(> c #1F4AC0", +"_> c #214BBF", +":> c #244CBE", +"<> c #254DBE", +"[> c #244DBE", +"}> c #224FBF", +"|> c #2051C1", +"1> c #2151C3", +"2> c #2252C5", +"3> c #2151C1", +"4> c #2851C6", +"5> c #2A50C6", +"6> c #2E54C6", +"7> c #1F51C2", +"8> c #1D52C5", +"9> c #2651C9", +"0> c #2950C7", +"a> c #2D40A5", +"b> c #2040B0", +"c> c #1F40B0", +"d> c #223CAE", +"e> c #233CAE", +"f> c #253BAC", +"g> c #253BAD", +"h> c #233CB0", +"i> c #213EB2", +"j> c #1F3FB4", +"k> c #1E40B6", +"l> c #1F3FB7", +"m> c #1E3EB8", +"n> c #1F3FB8", +"o> c #2040B7", +"p> c #2141B6", +"q> c #2140B7", +"r> c #2241B6", +"s> c #2342B5", +"t> c #2442B6", +"u> c #2543B5", +"v> c #2643B4", +"w> c #2544B6", +"x> c #2346B8", +"y> c #2247B9", +"z> c #2048BC", +"A> c #1F48BF", +"B> c #2049C0", +"C> c #214AC0", +"D> c #224BBF", +"E> c #234CBE", +"F> c #244DBF", +"G> c #234CBF", +"H> c #264DC0", +"I> c #274EBF", +"J> c #264DBF", +"K> c #254EBF", +"L> c #2050C0", +"M> c #1F51C1", +"N> c #1E42A4", +"O> c #263BA6", +"P> c #253BA7", +"Q> c #253CA7", +"R> c #1E41A5", +"S> c #1F40AF", +"T> c #273AAC", +"U> c #1E40B0", +"V> c #1F40B5", +"W> c #1F40B6", +"X> c #1F40B8", +"Y> c #1E40B8", +"Z> c #1F3EB8", +"`> c #203FB7", +" , c #2240B6", +"., c #2341B7", +"+, c #2345B9", +"@, c #2147BB", +"#, c #2148BA", +"$, c #2049BB", +"%, c #2049BD", +"&, c #2049BF", +"*, c #224BBE", +"=, c #244DBD", +"-, c #244CBF", +";, c #182969", +">, c #273BAD", +",, c #2739AB", +"', c #263AAC", +"), c #243CAE", +"!, c #233DAE", +"~, c #213EAF", +"{, c #1F3FB0", +"], c #2040B4", +"^, c #1F3FB6", +"/, c #1E3EB7", +"(, c #2240B7", +"_, c #2341B6", +":, c #2543B4", +"<, c #2644B3", +"[, c #2544B5", +"}, c #2545B5", +"|, c #2547B6", +"1, c #2548B7", +"2, c #2349BA", +"3, c #1F49BE", +"4, c #2149BD", +"5, c #2049BE", +"6, c #214BBE", +"7, c #2249BE", +"8, c #234CBD", +"9, c #2149BE", +"0, c #1E49BF", +"a, c #253BA9", +"b, c #253BAB", +"c, c #263AAB", +"d, c #213DAF", +"e, c #203EAF", +"f, c #1D40AF", +"g, c #1D40B0", +"h, c #1E40B4", +"i, c #2241B7", +"j, c #2643B6", +"k, c #2744B5", +"l, c #2643B5", +"m, c #2346B6", +"n, c #2147B7", +"o, c #2644B6", +"p, c #2247B7", +"q, c #2248B8", +"r, c #2647B7", +"s, c #2549B7", +"t, c #2645B7", +"u, c #2148B8", +"v, c #2847B6", +"w, c #2549B6", +"x, c #2849B6", +"y, c #2049B7", +"z, c #2A49B5", +"A, c #243BA4", +"B, c #253BA5", +"C, c #253BA6", +"D, c #263AA7", +"E, c #263AA8", +"F, c #2739AA", +"G, c #243CAD", +"H, c #223DAE", +"I, c #1F3EAF", +"J, c #1E3FB0", +"K, c #1D40B1", +"L, c #1E3FB1", +"M, c #1F3FB3", +"N, c #1F3FB5", +"O, c #2140B6", +"P, c #2140B8", +"Q, c #2744B4", +"R, c #2746B6", +"S, c #2947B6", +"T, c #2946B5", +"U, c #2A48B6", +"V, c #3551A8", +"W, c #1F399C", +"X, c #143D9F", +"Y, c #263BA5", +"Z, c #273BA8", +"`, c #273BAA", +" ' c #263AAD", +".' c #233CAD", +"+' c #213DAE", +"@' c #203FB2", +"#' c #2342B6", +"$' c #2443B6", +"%' c #2543B6", +"&' c #2644B5", +"*' c #133D9E", +"=' c #263BA7", +"-' c #263BA9", +";' c #273BA9", +">' c #263AAA", +",' c #2539AB", +"'' c #2639AB", +")' c #253AAC", +"!' c #243BAD", +"~' c #223DAF", +"{' c #203FB0", +"]' c #2040B1", +"^' c #2140B3", +"/' c #2543B1", +"(' c #2744AF", +"_' c #1A3CA0", +":' c #1D3BA2", +"<' c #233BA4", +"[' c #263AA5", +"}' c #253AA5", +"|' c #263AA6", +"1' c #263BA4", +"2' c #243BA5", +"3' c #263BA8", +"4' c #223EAF", +"5' c #3B4CA5", +"6' c #1D379A", +"7' c #1E389C", +"8' c #1E399F", +"9' c #1F3BA2", +"0' c #1F3BA3", +"a' c #213BA4", +"b' c #233AA3", +"c' c #243AA3", +"d' c #2539A4", +"e' c #253AA6", +"f' c #243BA7", +"g' c #253CAA", +"h' c #253CAC", +"i' c #253CAD", +"j' c #253CAE", +"k' c #243DAE", +"l' c #213FAF", +"m' c #223FAF", +"n' c #2040AF", +"o' c #253D93", +"p' c #1D3894", +"q' c #1F379A", +"r' c #1E389B", +"s' c #1D399C", +"t' c #1C3A9D", +"u' c #1B3A9D", +"v' c #183B9E", +"w' c #163C9E", +"x' c #153C9E", +"y' c #163B9D", +"z' c #173B9D", +"A' c #193A9D", +"B' c #1C3A9E", +"C' c #1F3AA1", +"D' c #223AA4", +"E' c #253BA8", +"F' c #273BA7", +"G' c #263CAB", +"H' c #263CAC", +"I' c #243EAE", +"J' c #273BAC", +"K' c #2A3795", +"L' c #1F389B", +"M' c #1D389B", +"N' c #1C399C", +"O' c #1B399C", +"P' c #1A3A9D", +"Q' c #1D399B", +"R' c #1B399B", +"S' c #1A3A9C", +"T' c #1B3A9F", +"U' c #1D3AA0", +"V' c #203BA2", +"W' c #203BA3", +"X' c #2639A6", +"Y' c #1B3692", +"Z' c #1C3794", +"`' c #1D3796", +" ) c #1E3898", +".) c #1E389A", +"+) c #1F399B", +"@) c #1A399C", +"#) c #193A9E", +"$) c #1A3BA0", +"%) c #1C3BA2", +"&) c #1D3CA3", +"*) c #203CA4", +"=) c #223BA5", +"-) c #3C4699", +";) c #2B4595", +">) c #1C3793", +",) c #1D3895", +"') c #1E3897", +")) c #1F3998", +"!) c #1F3999", +"~) c #1F399A", +"{) c #1E399C", +"]) c #1C3B9E", +"^) c #1D3BA0", +"/) c #1E3CA2", +"() c #223CA5", +"_) c #243CA6", +":) c #596FA9", +"<) c #3B4894", +"[) c #314993", +"}) c #29499F", +"|) c #28489E", +"1) c #2B4BA1", +"2) c #2C4BA1", +"3) c #2D4CA2", +"4) c #2E4CA3", +"5) c #2F4CA4", +"6) c #2E4CA4", +"7) c #2F4DA3", +"8) c #2F4DA4", +"9) c #D3D5D2", +"0) c #3B4794", +"a) c #314791", +"b) c #304892", +"c) c #304893", +"d) c #2F4995", +"e) c #2F4997", +"f) c #2D4A9A", +"g) c #2A4A9D", +"h) c #294A9F", +"i) c #284AA0", +"j) c #294AA0", +"k) c #2B4AA1", +"l) c #2D4CA3", +"m) c #C9CAC9", +"n) c #455D9B", +"o) c #242F78", +"p) c #1B2F85", +"q) c #C6C3C8", +"r) c #B5B2B6", +"s) c #B5B7B4", +"t) c #B5B7B3", +"u) c #B5B2B5", +"v) c #B5B3B4", +"w) c #B5B5B4", +"x) c #B5B6B3", +"y) c #B5B4B4", +"z) c #B5B3B5", +"A) c #B5B4B5", +"B) c #B5B5B5", +"C) c #B5B5B3", +"D) c #B5B5B6", +"E) c #BAC3BE", +"F) c #B9C3BD", +"G) c #C1C3C4", +"H) c #BFC3C2", +"I) c #B9C3BE", +"J) c #BBC3BF", +"K) c #BDC3C1", +"L) c #C0C3C3", +"M) c #BEC3C1", +"N) c #C2C3C5", +"O) c #E6E3E8", +"P) c #E0E2DF", +"Q) c #E1E1E1", +"R) c #E2E1E3", +"S) c #E4E1E6", +"T) c #E4E2E7", +"U) c #E4E2E6", +"V) c #E3E3E4", +"W) c #E2E3E3", +"X) c #E1E3E2", +"Y) c #E3E3E3", +"Z) c #E3E3E2", +"`) c #EBEDEA", +" ! c #EAECE9", +".! c #E9EBE8", +"+! c #ECEEEB", +". . + @ # $ $ $ $ $ $ $ % $ $ $ $ $ % $ $ $ $ $ $ % $ $ $ $ $ % $ $ $ $ $ $ $ $ $ % $ $ & * = - ; > , , ' ) ! ! ~ { ] ^ / ( _ : < [ } | | 1 2 3 3 4 4 4 4 4 4 4 5 6 4 4 4 5 6 7 8 9 4 5 6 7 8 9 6 7 8 9 ", +"0 a b % $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ c d d d d $ $ $ $ $ c d e f g h i i i i j k l m n o p q r s t u v w x y z 4 A B C D 9 9 E 9 E F G H I F J K L L L L J K L L L L L L L L ", +"@ % M N O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.b.b.b.b.b.", +"c.$ d.O e.f.g.g.g.h.g.g.g.g.g.h.h.g.g.g.g.g.h.h.g.g.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+@+$+%+&+*+=+$+-+;+>+,+'+)+!+;+>+,+~+,+>+,+~+,+", +"$ {+N N f.f.f.f.h.h.h.g.f.f.h.h.h.h.g.f.f.h.h.h.h.]+^+/+(+h._+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+.+C+D+E+D+F+G+H+C+I+F+G+J+K+L+H+F+G+J+K+L+H+J+H+J+H+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!`)`)`)`)`)+!`)`)`)+!`)"}; + + +static char * listviewhighcornerright_xpm[] = { +"100 46 780 2", +" c None", +". c #6A779D", +"+ c #6C789C", +"@ c #6C789D", +"# c #6B789D", +"$ c #6A779E", +"% c #66759E", +"& c #64749E", +"* c #63749E", +"= c #61739D", +"- c #576D9B", +"; c #556C9C", +"> c #4D679D", +", c #4A649D", +"' c #49629D", +") c #465E9C", +"! c #40579C", +"~ c #3B5394", +"{ c #2C4E97", +"] c #314993", +"^ c #2B4595", +"/ c #1B4296", +"( c #253D93", +"_ c #19418F", +": c #0F3C96", +"< c #42599E", +"[ c #758DC3", +"} c #E8EAE7", +"| c #EEF0ED", +"1 c #FBFBFC", +"2 c #6F7D9B", +"3 c #6F7D9A", +"4 c #6E7B9C", +"5 c #67759E", +"6 c #63739E", +"7 c #62739D", +"8 c #596F9C", +"9 c #4A639D", +"0 c #47609C", +"a c #445B9F", +"b c #3E5697", +"c c #2E509A", +"d c #2D509A", +"e c #2D4F99", +"f c #2D4F98", +"g c #28418A", +"h c #3E51A3", +"i c #D0D3DC", +"j c #A1B6EF", +"k c #A2B6F0", +"l c #A1B6F0", +"m c #A3B6F0", +"n c #A0B6EF", +"o c #9DB6EE", +"p c #9CB5EF", +"q c #9CB2F0", +"r c #9FB5EE", +"s c #9CB4EB", +"t c #9AB3EC", +"u c #9AB0EC", +"v c #9DB3EB", +"w c #9BB4EC", +"x c #9BB4EE", +"y c #9BB1EF", +"z c #9BB0F0", +"A c #90ACF0", +"B c #93ABEE", +"C c #91A8EB", +"D c #8BA3E8", +"E c #88A1E7", +"F c #809DE9", +"G c #7A99E8", +"H c #7491E5", +"I c #698AE4", +"J c #6184E3", +"K c #507EDC", +"L c #4E7CDB", +"M c #4F7DDC", +"N c #5479DA", +"O c #567BDC", +"P c #577CDD", +"Q c #5074DA", +"R c #5174DB", +"S c #5175DC", +"T c #5276DD", +"U c #4D71DE", +"V c #4C72D8", +"W c #3A6CE0", +"X c #2B49A6", +"Y c #E0E2DF", +"Z c #93AAE9", +"` c #94A9E8", +" . c #94AAE9", +".. c #93A9E9", +"+. c #92AAE9", +"@. c #8DA9E8", +"#. c #8CA7E9", +"$. c #92ABE9", +"%. c #8EAAE9", +"&. c #8EA9E9", +"*. c #8FAAE9", +"=. c #8CA8E9", +"-. c #8CA2E7", +";. c #86A1E6", +">. c #839EE9", +",. c #7F9CE9", +"'. c #7A97E8", +"). c #7693E7", +"!. c #6E8EE8", +"~. c #678AE9", +"{. c #5D84E3", +"]. c #577CDF", +"^. c #4E77DF", +"/. c #4A70DB", +"(. c #4870DB", +"_. c #4870DC", +":. c #4770E3", +"<. c #496FDC", +"[. c #486EDB", +"}. c #466FE4", +"|. c #466EE3", +"1. c #4167D9", +"2. c #4066D8", +"3. c #3F66D8", +"4. c #3D64D7", +"5. c #3960DA", +"6. c #476DD9", +"7. c #446EE5", +"8. c #305EC8", +"9. c #8EAAE8", +"0. c #8FAAE8", +"a. c #91AAE9", +"b. c #8FA9E8", +"c. c #8BA8E8", +"d. c #8AA7E9", +"e. c #8BA5EA", +"f. c #8AA7E8", +"g. c #87A2E6", +"h. c #859FE8", +"i. c #7F9DE8", +"j. c #7C9AE8", +"k. c #7B95E7", +"l. c #7090E8", +"m. c #6B8BE9", +"n. c #6386E6", +"o. c #5881E1", +"p. c #5479DE", +"q. c #4D74DE", +"r. c #476EDB", +"s. c #446EE1", +"t. c #446EE0", +"u. c #446EDF", +"v. c #446DE0", +"w. c #426ADF", +"x. c #3C64DA", +"y. c #4360CC", +"z. c #D3D5D2", +"A. c #E6E3E8", +"B. c #8DA2E7", +"C. c #8CA6EA", +"D. c #8DA3E9", +"E. c #88A2E7", +"F. c #87A1E7", +"G. c #8AA1E7", +"H. c #849EE9", +"I. c #7D9AE9", +"J. c #7B98E8", +"K. c #7796E5", +"L. c #7191E7", +"M. c #688CE9", +"N. c #6687E5", +"O. c #5C83E1", +"P. c #557BDE", +"Q. c #4F76DE", +"R. c #4C72DE", +"S. c #456EDF", +"T. c #426AD9", +"U. c #4269D9", +"V. c #4269D8", +"W. c #3D64D9", +"X. c #3A61DA", +"Y. c #345ED6", +"Z. c #335ECF", +"`. c #C6C3C8", +" + c #86A1E7", +".+ c #87A2E7", +"++ c #87A0E7", +"@+ c #859EE8", +"#+ c #849DE9", +"$+ c #7E9BE9", +"%+ c #7A99E9", +"&+ c #7A95E5", +"*+ c #7593E7", +"=+ c #6F8EE9", +"-+ c #668AE5", +";+ c #6386E0", +">+ c #5B82DF", +",+ c #5379DE", +"'+ c #5075DE", +")+ c #4B6FDC", +"!+ c #446AD7", +"~+ c #4269D6", +"{+ c #4269D5", +"]+ c #3E65D7", +"^+ c #C9CAC9", +"/+ c #869EE9", +"(+ c #859FE9", +"_+ c #849FE9", +":+ c #829DE8", +"<+ c #819DE8", +"[+ c #7B9AE9", +"}+ c #7A96E6", +"|+ c #7290E8", +"1+ c #698CE6", +"2+ c #6689E0", +"3+ c #5D84E0", +"4+ c #587FDF", +"5+ c #5377DD", +"6+ c #4B74DE", +"7+ c #496BD8", +"8+ c #7C9BE9", +"9+ c #7E9CE9", +"0+ c #7D9AEA", +"a+ c #7D9BEA", +"b+ c #7D98E8", +"c+ c #7C98E8", +"d+ c #7796E4", +"e+ c #7592E6", +"f+ c #7390E1", +"g+ c #698DE0", +"h+ c #6588DE", +"i+ c #5E84E0", +"j+ c #5880DF", +"k+ c #5479DC", +"l+ c #4F75DE", +"m+ c #4A6FDB", +"n+ c #436AD7", +"o+ c #3F65D7", +"p+ c #BAC3BE", +"q+ c #7B9AE8", +"r+ c #7B9AEA", +"s+ c #7A9AEA", +"t+ c #7B99E9", +"u+ c #7D97E7", +"v+ c #7D95E6", +"w+ c #7D95E5", +"x+ c #7C95E6", +"y+ c #7493E3", +"z+ c #7290DF", +"A+ c #6C8DDE", +"B+ c #6B89E1", +"C+ c #6486DF", +"D+ c #5D81DF", +"E+ c #567DDE", +"F+ c #4F73DE", +"G+ c #496EDA", +"H+ c #355ED6", +"I+ c #345ED5", +"J+ c #7E95E5", +"K+ c #7C97E8", +"L+ c #7C97E7", +"M+ c #7B94E6", +"N+ c #7A95E4", +"O+ c #7695E5", +"P+ c #7694E4", +"Q+ c #7994E6", +"R+ c #7995E4", +"S+ c #7594E4", +"T+ c #7391E2", +"U+ c #6E8EDE", +"V+ c #6B8ADE", +"W+ c #6688DF", +"X+ c #5F84E0", +"Y+ c #5980E0", +"Z+ c #4D72DD", +"`+ c #456BD7", +" @ c #4168D6", +".@ c #3C64D7", +"+@ c #335ED0", +"@@ c #4659C7", +"#@ c #7292E1", +"$@ c #7392E1", +"%@ c #7492E1", +"&@ c #718FDF", +"*@ c #6F8EDE", +"=@ c #6D8BDE", +"-@ c #6B88DF", +";@ c #597FDF", +">@ c #557ADD", +",@ c #5176DC", +"'@ c #4D74DD", +")@ c #496DDA", +"!@ c #3860D8", +"~@ c #7391E0", +"{@ c #7290DE", +"]@ c #6D8EDD", +"^@ c #6D8DDD", +"/@ c #7190E0", +"(@ c #6C8DDD", +"_@ c #6B89DF", +":@ c #6487E0", +"<@ c #6085DF", +"[@ c #5F81DE", +"}@ c #567EDE", +"|@ c #4F74D9", +"1@ c #466BD7", +"2@ c #4067D5", +"3@ c #3C63D7", +"4@ c #335ED3", +"5@ c #335ED1", +"6@ c #718EDD", +"7@ c #728EDD", +"8@ c #748EDD", +"9@ c #708EDD", +"0@ c #6F8DDD", +"a@ c #6E8DDD", +"b@ c #6C8ADE", +"c@ c #6C89DF", +"d@ c #6988DF", +"e@ c #6387DF", +"f@ c #6282DE", +"g@ c #5681E0", +"h@ c #577BDD", +"i@ c #5277DB", +"j@ c #4D73D8", +"k@ c #4A70D8", +"l@ c #436AD5", +"m@ c #3F66D6", +"n@ c #3C63D8", +"o@ c #3960D8", +"p@ c #3860D7", +"q@ c #335ED2", +"r@ c #345ED4", +"s@ c #6C88DF", +"t@ c #6D88DF", +"u@ c #6B89DE", +"v@ c #6888DF", +"w@ c #6587E0", +"x@ c #6989DF", +"y@ c #6687E0", +"z@ c #6287E0", +"A@ c #6281DD", +"B@ c #5881E0", +"C@ c #557ADB", +"D@ c #5176D9", +"E@ c #4E75D7", +"F@ c #4A6FD8", +"G@ c #476BD6", +"H@ c #4067D6", +"I@ c #3C62D7", +"J@ c #3C60D4", +"K@ c #365ED1", +"L@ c #345ED3", +"M@ c #6786DF", +"N@ c #5F85E0", +"O@ c #5F86E0", +"P@ c #6186DF", +"Q@ c #6286E0", +"R@ c #6284DF", +"S@ c #6384DF", +"T@ c #5B7FDE", +"U@ c #577DDC", +"V@ c #557BDA", +"W@ c #5278D8", +"X@ c #4E76D6", +"Y@ c #4C72D7", +"Z@ c #486DD8", +"`@ c #4469D6", +" # c #3F62D2", +".# c #3C60CF", +"+# c #345ECF", +"@# c #6086DF", +"## c #6085E0", +"$# c #6285DF", +"%# c #6383DD", +"&# c #6481DC", +"*# c #6380DD", +"=# c #6183DE", +"-# c #6083DD", +";# c #6081DC", +"># c #6080DD", +",# c #6083DE", +"'# c #6181DC", +")# c #6280DD", +"!# c #577EDB", +"~# c #557CD7", +"{# c #4F76D6", +"]# c #4E74D7", +"^# c #466CD7", +"/# c #3B64D6", +"(# c #4261CD", +"_# c #375FCE", +":# c #5A7FD8", +"<# c #6281DA", +"[# c #5F81D8", +"}# c #5C80D8", +"|# c #557DD7", +"1# c #577ED8", +"2# c #567ED7", +"3# c #587DD8", +"4# c #577DD8", +"5# c #587ED8", +"6# c #567DD8", +"7# c #5379D9", +"8# c #5177D7", +"9# c #4D74D5", +"0# c #486ED9", +"a# c #4068D4", +"b# c #3D65D2", +"c# c #4361CC", +"d# c #345ECE", +"e# c #325DCF", +"f# c #2C5AD1", +"g# c #3959C5", +"h# c #547BD8", +"i# c #567DD7", +"j# c #557BD8", +"k# c #5279D9", +"l# c #5278D9", +"m# c #4D74D6", +"n# c #4B71D8", +"o# c #496CD8", +"p# c #4669D7", +"q# c #3D66D3", +"r# c #3F62CF", +"s# c #4260CC", +"t# c #5379D8", +"u# c #4E75D4", +"v# c #4C73D7", +"w# c #476CD7", +"x# c #4869D0", +"y# c #4067D2", +"z# c #3D64D1", +"A# c #4261CC", +"B# c #395FCE", +"C# c #4F75D3", +"D# c #5074D2", +"E# c #5174D1", +"F# c #5175D1", +"G# c #4F74D3", +"H# c #4C73D5", +"I# c #4C73D4", +"J# c #4A72D1", +"K# c #4B70CF", +"L# c #506CCC", +"M# c #4D6BCE", +"N# c #4167D0", +"O# c #3D65D1", +"P# c #3F63CF", +"Q# c #3B5FCD", +"R# c #3159CD", +"S# c #4971D0", +"T# c #4870CF", +"U# c #4C6FCF", +"V# c #4E6CCE", +"W# c #4E6BCE", +"X# c #4769CF", +"Y# c #3D66D0", +"Z# c #3C65D1", +"`# c #4062CE", +" $ c #3D5FCD", +".$ c #365FCF", +"+$ c #325DCD", +"@$ c #2D5AD0", +"#$ c #3859C5", +"$$ c #355FCF", +"%$ c #355ECF", +"&$ c #335ECE", +"*$ c #305CCD", +"=$ c #2B5ACE", +"-$ c #3056C9", +";$ c #2553C6", +">$ c #2153C8", +",$ c #1F4FC7", +"'$ c #274CC5", +")$ c #214AC7", +"!$ c #1C48C8", +"~$ c #1244C9", +"{$ c #1043C9", +"]$ c #1144C9", +"^$ c #2A45BE", +"/$ c #2744B5", +"($ c #1D49C0", +"_$ c #2B58DE", +":$ c #002D94", +"<$ c #2B59CA", +"[$ c #2A59CA", +"}$ c #2E57C8", +"|$ c #3255C6", +"1$ c #3355C5", +"2$ c #1C52C8", +"3$ c #1D50C7", +"4$ c #234FC6", +"5$ c #264CC5", +"6$ c #1D48C7", +"7$ c #1245C8", +"8$ c #1F44C2", +"9$ c #2945BE", +"0$ c #2A45BD", +"a$ c #2040BF", +"b$ c #3156C7", +"c$ c #3056C7", +"d$ c #3354C5", +"e$ c #3355C6", +"f$ c #3255C5", +"g$ c #3254C5", +"h$ c #1952C7", +"i$ c #1951C8", +"j$ c #2050C7", +"k$ c #274CC4", +"l$ c #244CC6", +"m$ c #1F49C7", +"n$ c #1E47C5", +"o$ c #2045C3", +"p$ c #1C44BF", +"q$ c #2045BE", +"r$ c #2040B8", +"s$ c #3254C6", +"t$ c #3055C6", +"u$ c #2A54C6", +"v$ c #2353C7", +"w$ c #3054C5", +"x$ c #2F55C5", +"y$ c #2A54C5", +"z$ c #2553C5", +"A$ c #2F54C5", +"B$ c #3155C6", +"C$ c #2A54C7", +"D$ c #1A52C8", +"E$ c #204FC2", +"F$ c #264DC6", +"G$ c #234BC5", +"H$ c #1D48C1", +"I$ c #1E48BF", +"J$ c #2646BE", +"K$ c #2B45BD", +"L$ c #1E43BE", +"M$ c #2643BF", +"N$ c #2243BF", +"O$ c #3049BC", +"P$ c #1E50BE", +"Q$ c #1D50C0", +"R$ c #1D50BF", +"S$ c #1852C1", +"T$ c #1E51C0", +"U$ c #214FBF", +"V$ c #2050C0", +"W$ c #244EBF", +"X$ c #2151C0", +"Y$ c #234FBF", +"Z$ c #2350C0", +"`$ c #2351C0", +" % c #244FBF", +".% c #2250C0", +"+% c #2051C0", +"@% c #1E50C0", +"#% c #244DBE", +"$% c #274DBF", +"%% c #244CBF", +"&% c #1C48C0", +"*% c #2247BF", +"=% c #2C44BD", +"-% c #1C44BE", +";% c #1444BF", +">% c #1841BF", +",% c #1F40BF", +"'% c #254DBE", +")% c #224FBE", +"!% c #224FBF", +"~% c #234EBF", +"{% c #254CBD", +"]% c #244DBD", +"^% c #244CBD", +"/% c #264DBE", +"(% c #264DBD", +"_% c #214BC0", +":% c #1D48C0", +"<% c #2347BF", +"[% c #2B44BD", +"}% c #2444BE", +"|% c #0F42BF", +"1% c #0641BF", +"2% c #0F41BF", +"3% c #1741BE", +"4% c #1F40BD", +"5% c #234BBF", +"6% c #234CBE", +"7% c #214BBE", +"8% c #244CBE", +"9% c #214ABE", +"0% c #214ABF", +"a% c #1F48C0", +"b% c #2746BE", +"c% c #1F43BE", +"d% c #0941BE", +"e% c #0342BA", +"f% c #0242BC", +"g% c #1241B8", +"h% c #1F40B7", +"i% c #2F41AC", +"j% c #2644AE", +"k% c #2D49B4", +"l% c #2649B6", +"m% c #2949B7", +"n% c #2849B5", +"o% c #2149B8", +"p% c #1E49B9", +"q% c #1F48B8", +"r% c #1F49B9", +"s% c #2545B6", +"t% c #2744B7", +"u% c #2844B7", +"v% c #2043B8", +"w% c #1241B7", +"x% c #1340B8", +"y% c #0D41B8", +"z% c #1941B8", +"A% c #1F40B8", +"B% c #203FB8", +"C% c #2549B5", +"D% c #2648B6", +"E% c #2547B7", +"F% c #2248B7", +"G% c #2048B7", +"H% c #2346B6", +"I% c #2146B6", +"J% c #2247B7", +"K% c #2148B7", +"L% c #2743B4", +"M% c #2643B5", +"N% c #2542B6", +"O% c #1D42B7", +"P% c #0E42B8", +"Q% c #0C41B8", +"R% c #1341B8", +"S% c #1740B8", +"T% c #1C41B8", +"U% c #1F40B1", +"V% c #2644B5", +"W% c #2544B5", +"X% c #2544B4", +"Y% c #2444B5", +"Z% c #2444B4", +"`% c #2744B4", +" & c #2241B7", +".& c #1D41B8", +"+& c #0B42B8", +"@& c #0942B8", +"#& c #0C42B8", +"$& c #0F41B8", +"%& c #1641B8", +"&& c #2442B5", +"*& c #2543B3", +"=& c #2342B2", +"-& c #2341B4", +";& c #2141B3", +">& c #2141B5", +",& c #2140B5", +"'& c #2040B5", +")& c #1C40B7", +"!& c #1B41B3", +"~& c #0142B6", +"{& c #0E41B7", +"]& c #1141B7", +"^& c #1440B2", +"/& c #113FB0", +"(& c #1440B0", +"_& c #213EAF", +":& c #233DAE", +"<& c #223EAF", +"[& c #1E40B1", +"}& c #173EAD", +"|& c #1440AF", +"1& c #0D40AF", +"2& c #0941B0", +"3& c #0D3FAE", +"4& c #1B3CAC", +"5& c #233CAD", +"6& c #203FB0", +"7& c #273BAD", +"8& c #1D40B0", +"9& c #2040B1", +"0& c #1E40B0", +"a& c #1C40B0", +"b& c #1B3DAC", +"c& c #143DAC", +"d& c #193DAD", +"e& c #1B3DAD", +"f& c #173DAD", +"g& c #153DAC", +"h& c #1C3CAC", +"i& c #243CAD", +"j& c #213FB0", +"k& c #263BAA", +"l& c #253CAE", +"m& c #273AAC", +"n& c #273AAD", +"o& c #253BAD", +"p& c #1D3CAC", +"q& c #243BAD", +"r& c #1E3CAC", +"s& c #263BAD", +"t& c #1A3DAC", +"u& c #143DAB", +"v& c #163DAC", +"w& c #1A3CAC", +"x& c #1F3CAD", +"y& c #263BAB", +"z& c #263BA6", +"A& c #1E42A4", +"B& c #2D40A5", +"C& c #253BA6", +"D& c #253CA7", +"E& c #263AA5", +"F& c #253BA7", +"G& c #1E3BA6", +"H& c #193DA6", +"I& c #173DA5", +"J& c #143DA6", +"K& c #1A3DA7", +"L& c #133DA6", +"M& c #123DA5", +"N& c #1A3CA7", +"O& c #243BA6", +"P& c #263AA7", +"Q& c #273BA7", +"R& c #263AA6", +"S& c #223BA6", +"T& c #1D3BA6", +"U& c #173CA6", +"V& c #133DA5", +"W& c #1B3DA6", +"X& c #193DA5", +"Y& c #123DA4", +"Z& c #163CA5", +"`& c #213CA6", +" * c #273BA8", +".* c #263BA7", +"+* c #253BA5", +"@* c #263BA5", +"#* c #1C3BA6", +"$* c #1B3BA9", +"%* c #133BA8", +"&* c #0A3BA7", +"** c #083AA6", +"=* c #123CA5", +"-* c #0839A8", +";* c #0239A6", +">* c #123AA8", +",* c #1F49C8", +"'* c #2F4DA4", +")* c #2E4DA3", +"!* c #384CA4", +"~* c #3C4DA7", +"{* c #394EA7", +"]* c #3B4CA5", +"^* c #3C52B1", +"/* c #3551A8", +"(* c #3759BE", +"_* c #4161C7", +":* c #0033A8", +"<* c #596FA9", +"[* c #2F4DA3", +"}* c #2D4BA5", +"|* c #2E4CA4", +"1* c #2C4AA5", +"2* c #2D4BA4", +"3* c #354DA4", +"4* c #3A4BA4", +"5* c #394DA6", +"6* c #4056AD", +"7* c #445BBB", +"8* c #B5B7B4", +"9* c #1B2F85", +"0* c #242F79", +"a* c #B5B5B5", +"b* c #B5B2B6", +"c* c #C0C3C3", +"d* c #E3E3E4", +"e* c #EBEDEA", +". + @ + # $ % & # $ % & # $ % & # $ % & & * = - ; > , ' ) ! ~ { { { { { { { ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ / / / ( / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / _ _ / / : / < [ } | | | 1 1 ", +"2 2 2 2 3 2 4 @ 3 2 4 @ 3 2 4 @ 3 2 4 @ # 5 6 7 8 ; > 9 0 a b c d e f { { { ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ( ( ( ( ( ( ( ( ( / / / / / / / / / / / / / / / / / _ _ _ _ _ _ _ _ _ _ _ g g _ / / : : : h i } 1 | 1 ", +"j k l m n o p q n o p q r s t u v w x y z A B C D E F G H I J K L M N O P O O Q R S T T T T T T T T T T T T T T T T T T U U U U U U U U U U U U U U U U U U U U U U U U U U U U V V V U U W X : [ Y | | ", +"Z ` . ...+.@.#...+.@.#.Z $.%.&.Z $.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.6.7.8.: h Y } 1 ", +"9.0.a.b.c.c.d.e.f.c.d.e.f.c.d.e.f.c.d.e.g.h.i.j.k.l.m.n.o.p.q.r.s.s.t.u.u.v.w.x.4.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.y.5.7.6.: / z.A.} ", +"-.B.C.D.-.E.g.F.G.E.g.F.G.E.g.F.G.E.g.F.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.V.U.U.W.X.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y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.p+`.p+`.p+`.p+`.p+^+`.^+^+z.z.Y Y | | 1 ", +"d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*A.Y A.Y A.Y A.Y Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y } } | | | | 1 1 ", +"e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*} | } | } | } | | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | | | | 1 | | | 1 1 1 "}; + + +static char * tabmiddle_xpm[] = { +"33 42 32 1", +" c None", +". c #CECFEF", +"+ c #CECBE7", +"@ c #C6C7E7", +"# c #C6CBE7", +"$ c #BDBEDE", +"% c #BDC3DE", +"& c #CECBEF", +"* c #B5B6D6", +"= c #ADAECE", +"- c #ADB2CE", +"; c #BDBAD6", +"> c #B5BAD6", +", c #C6C3DE", +"' c #ADAAC6", +") c #B5B2CE", +"! c #B5B6CE", +"~ c #A5A2BD", +"{ c #A5A6BD", +"] c #9C9EB5", +"^ c #9CA2BD", +"/ c #ADAEC6", +"( c #C6C3E7", +"_ c #9C9AB5", +": c #A5A6C6", +"< c #949AAD", +"[ c #A5AAC6", +"} c #9496AD", +"| c #BDBADE", +"1 c #BDBED6", +"2 c #9CA2B5", +"3 c #A5AABD", +"..........................+@.#.#.", +"........................$@%&#.#..", +"......................**$$@@&#.#.", +".....................=-;>,%+@.#..", +"....................'')!$$@@&#.#.", +"...................~{=)$$@@&#.#..", +"..................]^'/;;(%&#.#...", +"................._]:/*>,%&@.#.#..", +".................<{[)!$%+@.#.#...", +"................}~{=!$%@@.#......", +"................]^/-|$@@.#.......", +"................]'/*;@@&#........", +"...............<~[)>,%&#.#.......", +"...............]~=)$%+#.#........", +"...............]'/;1@@.#.........", +"...............~{)*,%&#..........", +"...............2/-$$@#...........", +"...............~[*>(@&#..........", +"...............^=)$%+#...........", +"...............{'*>(@.#..........", +"...............^=)$%+#...........", +"...............{'*>(@.#..........", +"...............^=)$%+#...........", +"...............{'*>(@.#..........", +"...............^=)$%+#...........", +"...............{'*>(@.#..........", +"...............^=)$%+#...........", +"...............{'*>@@.#..........", +"...............^=!$%&#...........", +"...............{/*;@@.#..........", +"...............{)!$%&#...........", +"..............]'/;1@@.#..........", +"..............23)>,%&#...........", +"..............~=-$$@@.#..........", +".............]{/*;@@.#...........", +"............<^[)>,%&#............", +"............]{/!$%@@.#...........", +"..........]^[-!$%@@.#............", +".........]^3/!>$@@.#.............", +".......<]^3/!>$@@&#..............", +".....<]2{[/!>$%@&#.#.............", +"}<<_]2{3/-!>$%@&#.#.............."}; + + +static char * tabselectedbeginn_xpm[] = { +"33 39 28 1", +" c None", +". c #CECFEF", +"+ c #EFF3EF", +"@ c #FFFBFF", +"# c #F7FBF7", +"$ c #FFFFFF", +"% c #EFEFEF", +"& c #F7F7F7", +"* c #DEDFDE", +"= c #E7E7E7", +"- c #D6D3D6", +"; c #DEE3DE", +"> c #EFEBEF", +", c #F7F3F7", +"' c #CECBCE", +") c #CECFCE", +"! c #D6D7D6", +"~ c #DEDBDE", +"{ c #E7EBE7", +"] c #C6C7C6", +"^ c #E7E3E7", +"/ c #BDC3BD", +"( c #CED3CE", +"_ c #BDBABD", +": c #C6C3C6", +"< c #C6CBC6", +"[ c #D6DBD6", +"} c #BDBEBD", +"..........................+@#$#$$", +"........................%%&&@#$#$", +"......................*==%%&&@#$$", +"....................--*;>%,&@#$#$", +"...................')!~={,+@#$#$$", +"...................]-!^=%%&&@#$#$", +"................../'(~;>%&&@#$#$$", +"................._])!*={,&@#$#$$$", +"................_])~*>%&&$#$$$$$$", +"................:<![={&&@#$$$$$$$", +"................:)!^=,+@#$$$$$$$$", +"...............}'(*^%+@#$#$$$$$$$", +"...............:<!*>%&&$#$$$$$$$$", +".............../)!^{,&@#$$$$$$$$$", +"...............](*^%+@#$$$$$$$$$$", +"...............]!~=%&&$$$$$$$$$$$", +"...............'(*=,+@#$$$$$$$$$$", +"...............<!*>%&&$$$$$$$$$$$", +"...............'-^=,+@#$$$$$$$$$$", +"...............<!*>%&#$$$$$$$$$$$", +"...............'-^=,+@#$$$$$$$$$$", +"...............<!*>%&#$$$$$$$$$$$", +"...............'-^=,+@#$$$$$$$$$$", +"...............<!*>%&#$$$$$$$$$$$", +"...............'-^=,+@#$$$$$$$$$$", +"...............<!*>%&#$$$$$$$$$$$", +"...............'!^=,&@#$$$$$$$$$$", +"...............<~*>%&#$$$$$$$$$$$", +"...............)!^{,&@#$$$$$$$$$$", +"..............])~;%+@#$$$$$$$$$$$", +"..............]-[={&&$#$$$$$$$$$$", +".............])!^=,&@#$$$$$$$$$$$", +"............:'-*^%+@#$$$$$$$$$$$$", +"............])~*>%&&$#$$$$$$$$$$$", +"...........:'!*={,&@#$$$$$$$$$$$$", +"..........:'-~^=,+@#$$$$$$$$$$$$$", +".......}]'-~^=%,&@#$$$$$$$$$$$$$$", +".....}:])-~^=%,+@#$#$$$$$$$$$$$$$", +"}}}:]')-!*^=%,&@#$#$$$$$$$$$$$$$$"}; + + +static char * tabselectedend_xpm[] = { +"33 42 33 1", +" c None", +". c #FFFFFF", +"+ c #CECBE7", +"@ c #C6C7E7", +"# c #CECFEF", +"$ c #C6CBE7", +"% c #BDBEDE", +"& c #BDC3DE", +"* c #CECBEF", +"= c #B5B6D6", +"- c #ADAECE", +"; c #ADB2CE", +"> c #BDBAD6", +", c #B5BAD6", +"' c #C6C3DE", +") c #ADAAC6", +"! c #B5B2CE", +"~ c #B5B6CE", +"{ c #A5A2BD", +"] c #A5A6BD", +"^ c #9C9EB5", +"/ c #9CA2BD", +"( c #ADAEC6", +"_ c #C6C3E7", +": c #9C9AB5", +"< c #A5A6C6", +"[ c #949AAD", +"} c #A5AAC6", +"| c #9496AD", +"1 c #BDBADE", +"2 c #BDBED6", +"3 c #9CA2B5", +"4 c #A5AABD", +"..........................+@#$#$#", +"........................%@&*$#$##", +"......................==%%@@*$#$#", +".....................-;>,'&+@#$##", +"....................))!~%%@@*$#$#", +"...................{]-!%%@@*$#$##", +"..................^/)(>>_&*$#$###", +".................:^<(=,'&*@#$#$##", +".................[]}!~%&+@#$#$###", +"................|{]-~%&@@#$######", +"................^/(;1%@@#$#######", +"................^)(=>@@*$########", +"...............[{}!,'&*$#$#######", +"...............^{-!%&+$#$########", +"...............^)(>2@@#$#########", +"...............{]!='&*$##########", +"...............3(;%%@$###########", +"...............{}=,_@*$##########", +".............../-!%&+$###########", +"...............])=,_@#$##########", +".............../-!%&+$###########", +"...............])=,_@#$##########", +".............../-!%&+$###########", +"...............])=,_@#$##########", +".............../-!%&+$###########", +"...............])=,_@#$##########", +".............../-!%&+$###########", +"...............])=,@@#$##########", +".............../-~%&*$###########", +"...............](=>@@#$##########", +"...............]!~%&*$###########", +"..............^)(>2@@#$##########", +"..............34!,'&*$###########", +"..............{-;%%@@#$##########", +".............^](=>@@#$###########", +"............[/}!,'&*$############", +"............^](~%&@@#$###########", +"..........^/};~%&@@#$############", +".........^/4(~,%@@#$#############", +".......[^/4(~,%@@*$##############", +".....[^3]}(~,%&@*$#$#############", +"|[[:^3]4(;~,%&@*$#$##############"}; + + +static char * tabend_xpm[] = { +"33 42 3 1", +" c None", +". c #CECFEF", +"+ c #FFFFFF", +"..........................+++++++", +"........................+++++++++", +"......................+++++++++++", +".....................++++++++++++", +"....................+++++++++++++", +"...................++++++++++++++", +"..................+++++++++++++++", +".................++++++++++++++++", +".................++++++++++++++++", +"................+++++++++++++++++", +"................+++++++++++++++++", +"................+++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"...............++++++++++++++++++", +"..............+++++++++++++++++++", +"..............+++++++++++++++++++", +"..............+++++++++++++++++++", +".............++++++++++++++++++++", +"............+++++++++++++++++++++", +"............+++++++++++++++++++++", +"..........+++++++++++++++++++++++", +".........++++++++++++++++++++++++", +".......++++++++++++++++++++++++++", +".....++++++++++++++++++++++++++++", +"+++++++++++++++++++++++++++++++++"}; + + + + +QColor fromHsl(QColor c) +{ + const qreal h = c.hueF(); + const qreal s = c.saturationF(); + const qreal l = c.valueF(); + + qreal ca[3] = {0, 0, 0}; + + if (s == 0 || h == 1) { + // achromatic case + ca[0] = ca[1] = ca[2] = l; + } else { + // chromatic case + qreal temp2; + if (l < qreal(0.5)) + temp2 = l * (qreal(1.0) + s); + else + temp2 = l + s - (l * s); + + const qreal temp1 = (qreal(2.0) * l) - temp2; + qreal temp3[3] = { h + (qreal(1.0) / qreal(3.0)), + h, + h - (qreal(1.0) / qreal(3.0)) }; + + for (int i = 0; i != 3; ++i) { + if (temp3[i] < qreal(0.0)) + temp3[i] += qreal(1.0); + else if (temp3[i] > qreal(1.0)) + temp3[i] -= qreal(1.0); + + const qreal sixtemp3 = temp3[i] * qreal(6.0); + + if (sixtemp3 < qreal(1.0)) + ca[i] = ((temp1 + (temp2 - temp1) * sixtemp3)); + else if ((temp3[i] * qreal(2.0)) < qreal(1.0)) + ca[i] = (temp2); + else if ((temp3[i] * qreal(3.0)) < qreal(2.0)) + ca[i] = temp1 + (temp2 -temp1) * (qreal(2.0) /qreal(3.0) - temp3[i]) * qreal(6.0); + else ca[i] = temp1; + } + } + + return QColor::fromRgbF(ca[0], ca[1], ca[2]); +} + +#define Q_MAX_3(a, b, c) ( ( a > b && a > c) ? a : (b > c ? b : c) ) +#define Q_MIN_3(a, b, c) ( ( a < b && a < c) ? a : (b < c ? b : c) ) + +QColor toHsl(QColor c) +{ + QColor color; + qreal h; + qreal s; + qreal l; + + const qreal r = c.redF(); + const qreal g = c.greenF(); + const qreal b = c.blueF(); + const qreal max = Q_MAX_3(r, g, b); + const qreal min = Q_MIN_3(r, g, b); + const qreal delta = max - min; + const qreal delta2 = max + min; + const qreal lightness = qreal(0.5) * delta2; + l = (lightness); + if (qFuzzyIsNull(delta)) { + // achromatic case, hue is undefined + h = 0; + s = 0; + } else { + // chromatic case + qreal hue = 0; + if (lightness < qreal(0.5)) + s = ((delta / delta2)); + else + s = ((delta / (qreal(2.0) - delta2))); + if (qFuzzyCompare(r, max)) { + hue = ((g - b) /delta); + } else if (qFuzzyCompare(g, max)) { + hue = (2.0 + (b - r) / delta); + } else if (qFuzzyCompare(b, max)) { + hue = (4.0 + (r - g) / delta); + } else { + Q_ASSERT_X(false, "QColor::toHsv", "internal error"); + } + hue *= 60.0; + if (hue < 0.0) + hue += 360.0; + h = (hue * 100); + } + + h = h / 36000; + + return QColor::fromHsvF(h, s, l); +} + +void tintColor(QColor &color, QColor tintColor, qreal _saturation) +{ + tintColor = toHsl(tintColor); + color = toHsl(color); + qreal hue = tintColor.hueF(); + + qreal saturation = color.saturationF(); + if (_saturation) + saturation = _saturation; + qreal lightness = color.valueF(); + color.setHsvF(hue, saturation, lightness); + + color = fromHsl(color); + color.toRgb(); +} + +void tintImagePal(QImage *image, QColor color, qreal saturation) +{ + QVector<QRgb> colorTable = image->colorTable(); + for (int i=2;i< colorTable.size();i++) { + QColor c(toHsl(colorTable.at(i))); + tintColor(c, color, saturation); + colorTable[i] = c.rgb(); + } + image->setColorTable(colorTable); +} + + +void tintImage(QImage *image, QColor color, qreal saturation) +{ + *image = image->convertToFormat(QImage::Format_RGB32); + + for (int x = 0; x < image->width(); x++) + for (int y = 0; y < image->height(); y++) { + QColor c(image->pixel(x,y)); + tintColor(c, color, saturation); + image->setPixel(x, y, c.rgb()); + } +} + +#endif //Q_WS_WINCE_WM enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight }; +void QWindowsMobileStylePrivate::tintImagesButton(QColor color) +{ + if (currentTintButton == color) + return; + + imageTabEnd = QImage(tabend_xpm); + imageTabSelectedEnd = QImage(tabselectedend_xpm); + imageTabSelectedBegin = QImage(tabselectedbeginn_xpm); + imageTabMiddle = QImage(tabmiddle_xpm); + tintImage(&imageTabEnd, color, 0.0); + tintImage(&imageTabSelectedEnd, color, 0.0); + tintImage(&imageTabSelectedBegin, color, 0.0); + tintImage(&imageTabMiddle, color, 0.0); + + if (!doubleControls) { + int height = imageTabMiddle.height() / 2 + 1; + imageTabEnd = imageTabEnd.scaledToHeight(height); + imageTabMiddle = imageTabMiddle.scaledToHeight(height); + imageTabSelectedEnd = imageTabSelectedEnd.scaledToHeight(height); + imageTabSelectedBegin = imageTabSelectedBegin.scaledToHeight(height); + } +} + +void QWindowsMobileStylePrivate::tintImagesHigh(QColor color) +{ + if (currentTintHigh == color) + return; + currentTintHigh = color; + tintListViewHighlight(color); + imageScrollbarHandleUpHigh = imageScrollbarHandleUp; + imageScrollbarHandleDownHigh = imageScrollbarHandleDown; + tintImagePal(&imageScrollbarHandleDownHigh, color, qreal(0.8)); + tintImagePal(&imageScrollbarHandleUpHigh, color, qreal(0.8)); +} + +void QWindowsMobileStylePrivate::tintListViewHighlight(QColor color) +{ + imageListViewHighlightCornerRight = QImage(listviewhighcornerright_xpm); + tintImage(&imageListViewHighlightCornerRight, color, qreal(0.0)); + + imageListViewHighlightCornerLeft = QImage(listviewhighcornerleft_xpm); + tintImage(&imageListViewHighlightCornerLeft, color, qreal(0.0)); + + imageListViewHighlightMiddle = QImage(listviewhighmiddle_xpm); + tintImage(&imageListViewHighlightMiddle, color, qreal(0.0)); + + int height = imageListViewHighlightMiddle.height(); + if (!doubleControls) { + height = height / 2; + imageListViewHighlightCornerRight = imageListViewHighlightCornerRight.scaledToHeight(height); + imageListViewHighlightCornerLeft = imageListViewHighlightCornerLeft.scaledToHeight(height); + imageListViewHighlightMiddle = imageListViewHighlightMiddle.scaledToHeight(height); + } +} + +void QWindowsMobileStylePrivate::setupWindowsMobileStyle65() +{ +#ifdef Q_WS_WINCE_WM + wm65 = qt_wince_is_windows_mobile_65(); + if (wm65) { + imageScrollbarHandleUp = QImage(sbhandleup_xpm); + imageScrollbarHandleDown = QImage(sbhandledown_xpm); + imageScrollbarGripUp = QImage(sbgripup_xpm); + imageScrollbarGripDown = QImage(sbgripdown_xpm); + imageScrollbarGripMiddle = QImage(sbgripmiddle_xpm); + + if (!doubleControls) { + imageScrollbarHandleUp = imageScrollbarHandleUp.scaledToHeight(imageScrollbarHandleUp.height() / 2); + imageScrollbarHandleDown = imageScrollbarHandleDown.scaledToHeight(imageScrollbarHandleDown.height() / 2); + imageScrollbarGripMiddle = imageScrollbarGripMiddle.scaledToHeight(imageScrollbarGripMiddle.height() / 2); + imageScrollbarGripUp = imageScrollbarGripUp.scaledToHeight(imageScrollbarGripUp.height() / 2); + imageScrollbarGripDown = imageScrollbarGripDown.scaledToHeight(imageScrollbarGripDown.height() / 2); + } else { + } + tintImagesHigh(Qt::blue); + } +#endif //Q_WS_WINCE_WM +} + +void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab) +{ +#ifdef Q_WS_WINCE_WM + if (wm65) { + tintImagesButton(tab->palette.button().color()); + QRect r; + r.setTopLeft(tab->rect.topRight() - QPoint(imageTabMiddle.width(), 0)); + r.setBottomRight(tab->rect.bottomRight()); + if (tab->state & QStyle::State_Selected) { + painter->fillRect(tab->rect, tab->palette.window()); + } else { + painter->fillRect(tab->rect, QColor(imageTabMiddle.pixel(0,0))); + } + if (tab->selectedPosition == QStyleOptionTab::NextIsSelected) { + painter->drawImage(r, imageTabSelectedBegin); + } else if (tab->position == QStyleOptionTab::End || + tab->position == QStyleOptionTab::OnlyOneTab) { + if (!(tab->state & QStyle::State_Selected)) { + painter->drawImage(r, imageTabEnd); + } + } else if (tab->state & QStyle::State_Selected) { + painter->drawImage(r, imageTabSelectedEnd); + } else { + painter->drawImage(r, imageTabMiddle); + } + if (tab->position == QStyleOptionTab::Beginning && ! (tab->state & QStyle::State_Selected)) { + painter->drawImage(tab->rect.topLeft() - QPoint(imageTabMiddle.width() * 0.60, 0), imageTabSelectedEnd); + } + //imageTabBarBig + return; + } +#endif //Q_WS_WINCE_WM + painter->save(); + painter->setPen(tab->palette.shadow().color()); + if (doubleControls) { + QPen pen = painter->pen(); + pen.setWidth(2); + pen.setCapStyle(Qt::FlatCap); + painter->setPen(pen); + } + if(tab->shape == QTabBar::RoundedNorth) { + if (tab->state & QStyle::State_Selected) { + painter->fillRect(tab->rect, tab->palette.light()); + painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); + } + else { + painter->fillRect(tab->rect, tab->palette.button()); + painter->drawLine(tab->rect.bottomLeft() , tab->rect.bottomRight()); + painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); + } + } + else if(tab->shape == QTabBar::RoundedSouth) { + if (tab->state & QStyle::State_Selected) { + painter->fillRect(tab->rect.adjusted(0,-2,0,0), tab->palette.light()); + painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); + } + else { + painter->fillRect(tab->rect, tab->palette.button()); + if (doubleControls) + painter->drawLine(tab->rect.topLeft() + QPoint(0,1), tab->rect.topRight() + QPoint(0,1)); + else + painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); + painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); + } + } + else if(tab->shape == QTabBar::RoundedEast) { + if (tab->state & QStyle::State_Selected) { + painter->fillRect(tab->rect, tab->palette.light()); + painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); + } + else { + painter->fillRect(tab->rect, tab->palette.button()); + painter->drawLine(tab->rect.topLeft(), tab->rect.bottomLeft()); + painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); + } + } + else if(tab->shape == QTabBar::RoundedWest) { + if (tab->state & QStyle::State_Selected) { + painter->fillRect(tab->rect, tab->palette.light()); + painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight()); + } + else { + painter->fillRect(tab->rect, tab->palette.button()); + painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); + painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight()); + } + } + painter->restore(); +} + +void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect) +{ +#ifdef Q_WS_WINCE_WM + if (wm65) { + QRect r; + if (rect.isValid()) + r = rect; + else + r = option->rect; + tintImagesHigh(option->palette.highlight().color()); + + painter->setPen(QColor(Qt::lightGray)); + + if (option->viewItemPosition == QStyleOptionViewItemV4::Middle) { + painter->drawImage(r, imageListViewHighlightMiddle); + } else if (option->viewItemPosition == QStyleOptionViewItemV4::Beginning) { + painter->drawImage(r.adjusted(10, 0, 0, 0), imageListViewHighlightMiddle); + } else if (option->viewItemPosition == QStyleOptionViewItemV4::End) { + painter->drawImage(r.adjusted(0, 0, -10, 0), imageListViewHighlightMiddle); + } else { + painter->drawImage(r.adjusted(10, 0, -10, 0), imageListViewHighlightMiddle); + } + + QImage cornerLeft = imageListViewHighlightCornerLeft; + QImage cornerRight = imageListViewHighlightCornerRight; + + int width = r.width() > cornerRight.width() ? r.width() : cornerRight.width(); + + if ((width * 2) > r.width()) { + width = (r.width() - 5) / 2; + } + + cornerLeft = cornerLeft.scaled(width, r.height()); + cornerRight = cornerRight.scaled(width, r.height()); + + if ((option->viewItemPosition == QStyleOptionViewItemV4::Beginning) || (option->viewItemPosition == QStyleOptionViewItemV4::OnlyOne) || !option->viewItemPosition) { + painter->drawImage(r.topLeft(), cornerLeft); + } + if ((option->viewItemPosition == QStyleOptionViewItemV4::End) || (option->viewItemPosition == QStyleOptionViewItemV4::OnlyOne) || !option->viewItemPosition) { + painter->drawImage(r.topRight() - QPoint(cornerRight.width(),0), cornerRight); + } + return; + } +#endif //Q_WS_WINCE_WM + QPalette::ColorGroup cg = option->state & QStyle::State_Enabled + ? QPalette::Normal : QPalette::Disabled; + + if (rect.isValid()) + painter->fillRect(rect, option->palette.brush(cg, QPalette::Highlight)); + else + painter->fillRect(option->rect, option->palette.brush(cg, QPalette::Highlight)); +} + +void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame) +{ +#ifdef Q_WS_WINCE_WM + if (wm65) { + if (newScrollbar->orientation == Qt::Horizontal) { + QTransform transform; + transform.rotate(-90); + QRect r = newScrollbar->rect; + p->drawImage(r.adjusted(10, 0, -10, 0), imageScrollbarGripMiddle.transformed(transform)); + p->drawImage(r.topLeft(), imageScrollbarGripUp.transformed(transform)); + p->drawImage(r.topRight() - QPoint(imageScrollbarGripDown.height() - 1, 0), imageScrollbarGripDown.transformed(transform)); + } else { + QRect r = newScrollbar->rect; + p->drawImage(r.adjusted(0, 10, 0, -10), imageScrollbarGripMiddle); + p->drawImage(r.topLeft(), imageScrollbarGripUp); + p->drawImage(r.bottomLeft() - QPoint(0, imageScrollbarGripDown.height() - 1), imageScrollbarGripDown); + } + return ; + } +#endif + if (newScrollbar->orientation == Qt::Horizontal) { + p->fillRect(newScrollbar->rect,option->palette.button()); + QRect r = newScrollbar->rect; + p->drawLine(r.topLeft(), r.bottomLeft()); + p->drawLine(r.topRight(), r.bottomRight()); + if (smartphone) { + p->drawLine(r.topLeft(), r.topRight()); + p->drawLine(r.bottomLeft(), r.bottomRight()); + } + } + else { + p->fillRect(newScrollbar->rect,option->palette.button()); + QRect r = newScrollbar->rect; + p->drawLine(r.topLeft(), r.topRight()); + p->drawLine(r.bottomLeft(), r.bottomRight()); + if (smartphone) { + p->drawLine(r.topLeft(), r.bottomLeft()); + p->drawLine(r.topRight(), r.bottomRight()); + } + } + if (newScrollbar->state & QStyle::State_HasFocus) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*newScrollbar); + fropt.rect.setRect(newScrollbar->rect.x() + 2, newScrollbar->rect.y() + 2, + newScrollbar->rect.width() - 5, + newScrollbar->rect.height() - 5); + } + int gripMargin = doubleControls ? 4 : 2; + int doubleLines = doubleControls ? 2 : 1; + //If there is a frame around the scrollbar (abstractScrollArea), + //then the margin is different, because of the missing frame + int gripMarginFrame = doubleControls ? 3 : 1; + if (drawCompleteFrame) + gripMarginFrame = 0; + //draw grips + if (!smartphone) + if (newScrollbar->orientation == Qt::Horizontal) { + for (int i = -3; i < 3; i += 2) { + p->drawLine( + QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1, + newScrollbar->rect.top() + gripMargin +gripMarginFrame), + QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1, + newScrollbar->rect.bottom() - gripMargin)); + } + } else { + for (int i = -2; i < 4 ; i += 2) { + p->drawLine( + QPoint(newScrollbar->rect.left() + gripMargin + gripMarginFrame , + newScrollbar->rect.center().y() + 1 + i * doubleLines - 1), + QPoint(newScrollbar->rect.right() - gripMargin, + newScrollbar->rect.center().y() + 1 + i * doubleLines - 1)); + } + } + if (!smartphone) { + QRect r; + if (doubleControls) + r = option->rect.adjusted(1, 1, -1, 0); + else + r = option->rect.adjusted(0, 0, -1, 0); + if (drawCompleteFrame && doubleControls) + r.adjust(0, 0, 0, -1); + //Check if the scrollbar is part of an abstractItemView and draw the frame according + if (drawCompleteFrame) + p->drawRect(r); + else + if (newScrollbar->orientation == Qt::Horizontal) + p->drawLine(r.topLeft(), r.topRight()); + else + p->drawLine(r.topLeft(), r.bottomLeft()); + } +} + +void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool ) +{ +#ifdef Q_WS_WINCE_WM + if (wm65) { + tintImagesHigh(opt->palette.highlight().color()); + QRect r = opt->rect; + if (opt->orientation == Qt::Horizontal) { + QTransform transform; + transform.rotate(-90); + if (opt->state & QStyle::State_Sunken) + p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh.transformed(transform)); + else + p->drawImage(r.topLeft(), imageScrollbarHandleUp.transformed(transform)); + } else { + if (opt->state & QStyle::State_Sunken) + p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh); + else + p->drawImage(r.topLeft(), imageScrollbarHandleUp); + } + return ; + } +#endif //Q_WS_WINCE_WM + + QBrush fill = opt->palette.button(); + if (opt->state & QStyle::State_Sunken) + fill = opt->palette.shadow(); + + QStyleOption arrowOpt = *opt; + if (doubleControls) + arrowOpt.rect = opt->rect.adjusted(4, 6, -5, -3); + else + arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3); + + bool horizontal = (opt->orientation == Qt::Horizontal); + + if (horizontal) { + p->fillRect(opt->rect,fill); + QRect r = opt->rect.adjusted(0,0,1,0); + p->drawLine(r.topRight(), r.bottomRight()); + if (doubleControls) + arrowOpt.rect.adjust(0, -2 ,0, -2); + q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowLeft, &arrowOpt, p, 0); + } else { + p->fillRect(opt->rect,fill); + QRect r = opt->rect.adjusted(0, 0, 0, 1); + p->drawLine(r.bottomLeft(), r.bottomRight()); + if (completeFrame) + arrowOpt.rect.adjust(-2, 0, -2, 0); + if (doubleControls) + arrowOpt.rect.adjust(0, -4 , 0, -4); + if (completeFrame && doubleControls) + arrowOpt.rect.adjust(2, 0, 2, 0); + q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowUp, &arrowOpt, p, 0); + } +} + +void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar) +{ + +#ifdef Q_WS_WINCE_WM + if (wm65) { + tintImagesHigh(opt->palette.highlight().color()); + QRect r = opt->rect; + if (opt->orientation == Qt::Horizontal) { + QTransform transform; + transform.rotate(-90); + if (opt->state & QStyle::State_Sunken) + p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh.transformed(transform)); + else + p->drawImage(r.topLeft(), imageScrollbarHandleDown.transformed(transform)); + } else { + if (opt->state & QStyle::State_Sunken) + p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh); + else + p->drawImage(r.topLeft(), imageScrollbarHandleDown); + } + return ; + } +#endif //Q_WS_WINCE_WM + + QBrush fill = opt->palette.button(); + if (opt->state & QStyle::State_Sunken) + fill = opt->palette.shadow(); + + QStyleOption arrowOpt = *opt; + if (doubleControls) + arrowOpt.rect = opt->rect.adjusted(4, 0, -5, 3); + else + arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3); + + bool horizontal = (opt->orientation == Qt::Horizontal); + + if (horizontal) { + p->fillRect(opt->rect,fill); + QRect r = opt->rect.adjusted(0, 0, 0, 0); + p->drawLine(r.topLeft(), r.bottomLeft()); + if (secondScrollBar) + p->drawLine(r.topRight(), r.bottomRight()); + if (doubleControls) + arrowOpt.rect.adjust(0, 4, 0, 4 ); + q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowRight, &arrowOpt, p, 0); + } else { + p->fillRect(opt->rect,fill); + QRect r = opt->rect.adjusted(0, -1, 0, -1); + p->drawLine(r.topLeft(), r.topRight()); + if (secondScrollBar) + p->drawLine(r.bottomLeft() + QPoint(0,1), r.bottomRight() + QPoint(0, 1)); + if (completeFrame) + arrowOpt.rect.adjust(-2, 0, -2, 0); + if (doubleControls) + arrowOpt.rect.adjust(1, 0, 1, 0 ); + if (completeFrame && doubleControls) + arrowOpt.rect.adjust(1, 0, 1, 0); + q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &arrowOpt, p, 0); + } +} + +void QWindowsMobileStylePrivate::drawScrollbarGroove(QPainter *p,const QStyleOptionSlider *opt) +{ +#ifdef Q_OS_WINCE_WM + if (wm65) { + p->fillRect(opt->rect, QColor(231, 231, 231)); + return ; + } +#endif + QBrush fill; + if (smartphone) { + fill = opt->palette.light(); + p->fillRect(opt->rect, fill); + fill = opt->palette.button(); + QImage image; +#ifndef QT_NO_IMAGEFORMAT_XPM + if (opt->orientation == Qt::Horizontal) + image = QImage(vertlines_xpm); + else + image = QImage(horlines_xpm); +#endif + image.setColor(1, opt->palette.button().color().rgb()); + fill.setTextureImage(image); + } + else { + fill = opt->palette.light(); + } + p->fillRect(opt->rect, fill); +} + QWindowsMobileStyle::QWindowsMobileStyle(QWindowsMobileStylePrivate &dd) : QWindowsStyle(dd) { qApp->setEffectEnabled(Qt::UI_FadeMenu, false); qApp->setEffectEnabled(Qt::UI_AnimateMenu, false); @@ -721,6 +4549,9 @@ QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() imageNormalize = QImage(normal_small_xpm); } + setupWindowsMobileStyle65(); + + imageArrowDownBig = QImage(arrowdown_big_xpm); imageArrowUpBig = QImage(arrowdown_big_xpm).mirrored(); imageArrowLeftBig = QImage(arrowleft_big_xpm); @@ -1156,7 +4987,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp case PE_IndicatorSpinPlus: case PE_IndicatorSpinMinus: { QRect r = option->rect; - int fw = pixelMetric(PM_DefaultFrameWidth, option, widget)+2; + int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget)+2; QRect br = r.adjusted(fw, fw, -fw, -fw); int offset = (option->state & State_Sunken) ? 1 : 0; int step = (br.width() + 4) / 5; @@ -1193,8 +5024,8 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp break; } if (option->state & State_Sunken) - painter->translate(pixelMetric(PM_ButtonShiftHorizontal), - pixelMetric(PM_ButtonShiftVertical)); + painter->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal), + proxy()->pixelMetric(PM_ButtonShiftVertical)); if (option->state & State_Enabled) { painter->translate(option->rect.x() + option->rect.width() / 2, option->rect.y() + option->rect.height() / 2); @@ -1373,21 +5204,37 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } switch (tab->shape) { case QTabBar::RoundedNorth: +#ifdef Q_WS_WINCE_WM + if (!d->wm65) +#endif + { if (d->doubleControls) - painter->drawLine(rect.topLeft() + QPoint(0, 1), rect.topRight() + QPoint(0, 1)); + painter->drawLine(rect.topLeft() + QPoint(0, 1), rect.topRight() + QPoint(0, 1)); else painter->drawLine(rect.topLeft(), rect.topRight()); + } break; case QTabBar::RoundedSouth: +#ifdef Q_WS_WINCE_WM + if (!d->wm65) +#endif + { if (d->doubleControls) painter->drawLine(rect.bottomLeft(), rect.bottomRight()); else painter->drawLine(rect.bottomLeft(), rect.bottomRight()); + } break; case QTabBar::RoundedEast: +#ifdef Q_WS_WINCE_WM + if (!d->wm65) +#endif painter->drawLine(rect.topRight(), rect.bottomRight()); break; case QTabBar::RoundedWest: +#ifdef Q_WS_WINCE_WM + if (!d->wm65) +#endif painter->drawLine(rect.topLeft(), rect.bottomLeft()); break; case QTabBar::TriangularWest: @@ -1406,6 +5253,47 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } break; #endif //QT_NO_TABBAR +#ifndef QT_NO_ITEMVIEWS + case PE_PanelItemViewRow: + if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) { + QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled + ? QPalette::Normal : QPalette::Disabled; + if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) + cg = QPalette::Inactive; + + if ((vopt->state & QStyle::State_Selected) && proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget)) + d->drawPanelItemViewSelected(painter, vopt); + else if (vopt->features & QStyleOptionViewItemV2::Alternate) + painter->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase)); + else if (!(vopt->state & QStyle::State_Enabled)) + painter->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Base)); + } + break; + case PE_PanelItemViewItem: + if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) { + QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled + ? QPalette::Normal : QPalette::Disabled; + if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) + cg = QPalette::Inactive; + + if (vopt->showDecorationSelected && (vopt->state & QStyle::State_Selected)) { + d->drawPanelItemViewSelected(painter, vopt); + } else { + if (vopt->backgroundBrush.style() != Qt::NoBrush) { + QPointF oldBO = painter->brushOrigin(); + painter->setBrushOrigin(vopt->rect.topLeft()); + painter->fillRect(vopt->rect, vopt->backgroundBrush); + painter->setBrushOrigin(oldBO); + } + + if (vopt->state & QStyle::State_Selected) { + QRect textRect = proxy()->subElementRect(QStyle::SE_ItemViewItemText, option, widget); + d->drawPanelItemViewSelected(painter, vopt, textRect); + } + } + } + break; +#endif //QT_NO_ITEMVIEWS case PE_FrameWindow: { QPalette popupPal = option->palette; @@ -1501,25 +5389,25 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption case CE_PushButtonBevel: if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { QRect br = button->rect; - int dbi = pixelMetric(PM_ButtonDefaultIndicator, button, widget); + int dbi = proxy()->pixelMetric(PM_ButtonDefaultIndicator, button, widget); if (button->features & QStyleOptionButton::AutoDefaultButton) br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi); QStyleOptionButton tmpBtn = *button; tmpBtn.rect = br; - drawPrimitive(PE_PanelButtonCommand, &tmpBtn, painter, widget); + proxy()->drawPrimitive(PE_PanelButtonCommand, &tmpBtn, painter, widget); if (button->features & QStyleOptionButton::HasMenu) { - int mbi = pixelMetric(PM_MenuButtonIndicator, button, widget); + int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget); QRect ir = button->rect; QStyleOptionButton newButton = *button; if (d->doubleControls) newButton.rect = QRect(ir.right() - mbi, ir.height() - 30, mbi, ir.height() - 4); else newButton.rect = QRect(ir.right() - mbi, ir.height() - 20, mbi, ir.height() - 4); - drawPrimitive(PE_IndicatorArrowDown, &newButton, painter, widget); + proxy()->drawPrimitive(PE_IndicatorArrowDown, &newButton, painter, widget); } if (button->features & QStyleOptionButton::DefaultButton) - drawPrimitive(PE_FrameDefaultButton, option, painter, widget); + proxy()->drawPrimitive(PE_FrameDefaultButton, option, painter, widget); } break; case CE_RadioButton: @@ -1527,19 +5415,19 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { bool isRadio = (element == CE_RadioButton); QStyleOptionButton subopt = *button; - subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator + subopt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonIndicator : SE_CheckBoxIndicator, button, widget); - drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, + proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, &subopt, painter, widget); - subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents + subopt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonContents : SE_CheckBoxContents, button, widget); - drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, painter, widget); + proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, painter, widget); if (button->state & State_HasFocus) { QStyleOptionFocusRect fropt; fropt.QStyleOption::operator=(*button); - fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect + fropt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonFocusRect : SE_CheckBoxFocusRect, button, widget); - drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); } } break; @@ -1553,7 +5441,7 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption QRect textRect = button->rect; if (!button->icon.isNull()) { pix = button->icon.pixmap(button->iconSize, button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled); - drawItemPixmap(painter, button->rect, alignment, pix); + proxy()->drawItemPixmap(painter, button->rect, alignment, pix); if (button->direction == Qt::RightToLeft) textRect.setRight(textRect.right() - button->iconSize.width() - 4); else @@ -1561,10 +5449,10 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption } if (!button->text.isEmpty()){ if (button->state & State_Enabled) - drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, + proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, button->palette, false, button->text, QPalette::WindowText); else - drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, + proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, button->palette, false, button->text, QPalette::Mid); } } @@ -1580,73 +5468,16 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption #ifndef QT_NO_TABBAR case CE_TabBarTab: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - drawControl(CE_TabBarTabShape, tab, painter, widget); - drawControl(CE_TabBarTabLabel, tab, painter, widget); + proxy()->drawControl(CE_TabBarTabShape, tab, painter, widget); + proxy()->drawControl(CE_TabBarTabLabel, tab, painter, widget); } break; case CE_TabBarTabShape: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { + if (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::RoundedWest) { - - painter->save(); - painter->setPen(tab->palette.shadow().color()); - if (d->doubleControls) { - QPen pen = painter->pen(); - pen.setWidth(2); - pen.setCapStyle(Qt::FlatCap); - painter->setPen(pen); - } - if(tab->shape == QTabBar::RoundedNorth) { - if (tab->state & State_Selected) { - painter->fillRect(tab->rect, tab->palette.light()); - painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); - } - else { - painter->fillRect(tab->rect, tab->palette.button()); - painter->drawLine(tab->rect.bottomLeft() , tab->rect.bottomRight()); - painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); - } - } - else if(tab->shape == QTabBar::RoundedSouth) { - - if (tab->state & State_Selected) { - painter->fillRect(tab->rect.adjusted(0,-2,0,0), tab->palette.light()); - painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); - } - else { - painter->fillRect(tab->rect, tab->palette.button()); - if (d->doubleControls) - painter->drawLine(tab->rect.topLeft() + QPoint(0,1), tab->rect.topRight() + QPoint(0,1)); - else - painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); - painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); - } - } - else if(tab->shape == QTabBar::RoundedEast) { - if (tab->state & State_Selected) { - painter->fillRect(tab->rect, tab->palette.light()); - painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); - } - else { - painter->fillRect(tab->rect, tab->palette.button()); - painter->drawLine(tab->rect.topLeft(), tab->rect.bottomLeft()); - painter->drawLine(tab->rect.topLeft(), tab->rect.topRight()); - } - } - else if(tab->shape == QTabBar::RoundedWest) { - if (tab->state & State_Selected) { - painter->fillRect(tab->rect, tab->palette.light()); - painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight()); - } - else { - painter->fillRect(tab->rect, tab->palette.button()); - painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight()); - painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight()); - } - } - - painter->restore(); + d->drawTabBarTab(painter, tab); } else { QCommonStyle::drawControl(element, option, painter, widget); } @@ -1677,17 +5508,17 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { QRegion clipRegion = painter->clipRegion(); painter->setClipRect(option->rect); - drawControl(CE_HeaderSection, header, painter, widget); + proxy()->drawControl(CE_HeaderSection, header, painter, widget); QStyleOptionHeader subopt = *header; - subopt.rect = subElementRect(SE_HeaderLabel, header, widget); + subopt.rect = proxy()->subElementRect(SE_HeaderLabel, header, widget); if (header->state & State_Sunken) subopt.palette.setColor(QPalette::ButtonText, header->palette.brightText().color()); subopt.state |= QStyle::State_On; if (subopt.rect.isValid()) - drawControl(CE_HeaderLabel, &subopt, painter, widget); + proxy()->drawControl(CE_HeaderLabel, &subopt, painter, widget); if (header->sortIndicator != QStyleOptionHeader::None) { - subopt.rect = subElementRect(SE_HeaderArrow, option, widget); - drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); + subopt.rect = proxy()->subElementRect(SE_HeaderArrow, option, widget); + proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); } painter->setClipRegion(clipRegion); } @@ -1832,14 +5663,14 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption painter->setFont(newFont); QPalette palette = dwOpt->palette; palette.setColor(QPalette::Window, inactiveCaptionTextColor); - QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, option, widget); + QRect titleRect = proxy()->subElementRect(SE_DockWidgetTitleBarText, option, widget); if (verticalTitleBar) { titleRect = QRect(r.left() + rect.bottom() - titleRect.bottom(), r.top() + titleRect.left() - rect.left(), titleRect.height(), titleRect.width()); } - drawItemText(painter, titleRect, + proxy()->drawItemText(painter, titleRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, palette, dwOpt->state & State_Enabled, dwOpt->title, floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText); @@ -1889,7 +5720,7 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption point.rx() += pixw; if ((button->state & (State_On | State_Sunken)) && button->direction == Qt::RightToLeft) - point.rx() -= pixelMetric(PM_ButtonShiftHorizontal, option, widget) * 2; + point.rx() -= proxy()->pixelMetric(PM_ButtonShiftHorizontal, option, widget) * 2; painter->drawPixmap(visualPos(button->direction, button->rect, point), pixmap); @@ -1905,9 +5736,9 @@ void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption tf |= Qt::AlignHCenter; } if (button->state & State_Enabled) - drawItemText(painter, ir, tf, button->palette, true, button->text, colorRole); + proxy()->drawItemText(painter, ir, tf, button->palette, true, button->text, colorRole); else - drawItemText(painter, ir, tf, button->palette, true, button->text, QPalette::Mid); + proxy()->drawItemText(painter, ir, tf, button->palette, true, button->text, QPalette::Mid); painter->restore(); } break; @@ -1927,11 +5758,11 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl #ifndef QT_NO_SLIDER case CC_Slider: if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - int thickness = pixelMetric(PM_SliderControlThickness, slider, widget); - int len = pixelMetric(PM_SliderLength, slider, widget); + int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); + int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); int ticks = slider->tickPosition; - QRect groove = subControlRect(CC_Slider, slider, SC_SliderGroove, widget); - QRect handle = subControlRect(CC_Slider, slider, SC_SliderHandle, widget); + QRect groove = proxy()->subControlRect(CC_Slider, slider, SC_SliderGroove, widget); + QRect handle = proxy()->subControlRect(CC_Slider, slider, SC_SliderHandle, widget); if ((slider->subControls & SC_SliderGroove) && groove.isValid()) { int mid = thickness / 2; @@ -1982,8 +5813,8 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl if (slider->state & State_HasFocus) { QStyleOptionFocusRect fropt; fropt.QStyleOption::operator=(*slider); - fropt.rect = subElementRect(SE_SliderFocusRect, slider, widget); - drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); + fropt.rect = proxy()->subElementRect(SE_SliderFocusRect, slider, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); } if ((tickAbove && tickBelow) || (!tickAbove && !tickBelow)) { Qt::BGMode oldMode = painter->backgroundMode(); @@ -2118,26 +5949,8 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl painter->setPen(pen); } if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { + d->drawScrollbarGroove(painter, scrollbar); // Make a copy here and reset it for each primitive. - QBrush fill; - if (d->smartphone) { - fill = option->palette.light(); - painter->fillRect(option->rect,fill); - fill = option->palette.button(); - QImage image; -#ifndef QT_NO_IMAGEFORMAT_XPM - if (scrollbar->orientation == Qt::Horizontal) - image = QImage(vertlines_xpm); - else - image = QImage(horlines_xpm); -#endif - image.setColor(1, option->palette.button().color().rgb()); - fill.setTextureImage(image); - } - else { - fill = option->palette.light(); - } - painter->fillRect(option->rect,fill); QStyleOptionSlider newScrollbar = *scrollbar; State saveFlags = scrollbar->state; //Check if the scrollbar is part of an abstractItemView and draw the frame according @@ -2159,209 +5972,34 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl saveFlags |= State_Enabled; if (scrollbar->subControls & SC_ScrollBarSubLine) { newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarSubLine, widget); + newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarSubLine, widget); if (newScrollbar.rect.isValid()) { if (!(scrollbar->activeSubControls & SC_ScrollBarSubLine)) newScrollbar.state &= ~(State_Sunken | State_MouseOver); - QStyleOption arrowOpt = newScrollbar; - if (d->doubleControls) - arrowOpt.rect = newScrollbar.rect.adjusted(4, 6, -5, -3); - else - arrowOpt.rect = newScrollbar.rect.adjusted(5, 6, -4, -3); - QBrush fill = option->palette.button(); - if (newScrollbar.state & State_Sunken) - fill = option->palette.shadow(); - if (scrollbar->orientation == Qt::Horizontal) { - painter->fillRect(newScrollbar.rect,fill); - QRect r = newScrollbar.rect.adjusted(0,0,1,0); - painter->drawLine(r.topRight(), r.bottomRight()); - if (d->doubleControls) - arrowOpt.rect.adjust(0, -2 ,0, -2); - drawPrimitive(PE_IndicatorArrowLeft, &arrowOpt, painter, widget); - } - else { - painter->fillRect(newScrollbar.rect,fill); - QRect r = newScrollbar.rect.adjusted(0, 0, 0, 1); - painter->drawLine(r.bottomLeft(), r.bottomRight()); - if (drawCompleteFrame) - arrowOpt.rect.adjust(-2, 0, -2, 0); - if (d->doubleControls) - arrowOpt.rect.adjust(0, -4 , 0, -4); - if (drawCompleteFrame && d->doubleControls) - arrowOpt.rect.adjust(2, 0, 2, 0); - drawPrimitive(PE_IndicatorArrowUp, &arrowOpt, painter, widget); - } + d->drawScrollbarHandleUp(painter, &newScrollbar, drawCompleteFrame, secondScrollBar); } } if (scrollbar->subControls & SC_ScrollBarAddLine) { newScrollbar.rect = scrollbar->rect; newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarAddLine, widget); + newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarAddLine, widget); if (newScrollbar.rect.isValid()) { if (!(scrollbar->activeSubControls & SC_ScrollBarAddLine)) newScrollbar.state &= ~(State_Sunken | State_MouseOver); - QStyleOption arrowOpt = newScrollbar; - if (d->doubleControls) - arrowOpt.rect = newScrollbar.rect.adjusted(4, 0, -5, 3); - else - arrowOpt.rect = newScrollbar.rect.adjusted(5, 6, -4, -3); - QBrush fill = option->palette.button(); - if (newScrollbar.state & State_Sunken) - fill = option->palette.shadow(); - if (scrollbar->orientation == Qt::Horizontal) { - painter->fillRect(newScrollbar.rect,fill); - QRect r = newScrollbar.rect.adjusted(0, 0, 0, 0); - painter->drawLine(r.topLeft(), r.bottomLeft()); - if (secondScrollBar) - painter->drawLine(r.topRight(), r.bottomRight()); - if (d->doubleControls) - arrowOpt.rect.adjust(0, 4, 0, 4 ); - drawPrimitive(PE_IndicatorArrowRight, &arrowOpt, painter, widget); - } - else { - painter->fillRect(newScrollbar.rect,fill); - QRect r = newScrollbar.rect.adjusted(0, -1, 0, -1); - painter->drawLine(r.topLeft(), r.topRight()); - if (secondScrollBar) - painter->drawLine(r.bottomLeft() + QPoint(0,1), r.bottomRight() + QPoint(0, 1)); - if (drawCompleteFrame) - arrowOpt.rect.adjust(-2, 0, -2, 0); - if (d->doubleControls) - arrowOpt.rect.adjust(1, 0, 1, 0 ); - if (drawCompleteFrame && d->doubleControls) - arrowOpt.rect.adjust(1, 0, 1, 0); - drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, painter, widget); - } - } - } - if (scrollbar->subControls & SC_ScrollBarSubPage) { - newScrollbar.rect = scrollbar->rect; - newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarSubPage, widget); - if (newScrollbar.rect.isValid()) { - if (!(scrollbar->activeSubControls & SC_ScrollBarSubPage)) - newScrollbar.state &= ~(State_Sunken | State_MouseOver); - if (scrollbar->orientation == Qt::Horizontal) { - QRect r = newScrollbar.rect.adjusted(0, 0, 0, 0); - } - else{ - QRect r = newScrollbar.rect.adjusted(0, 0, 0, 0); - } - } - } - if (scrollbar->subControls & SC_ScrollBarAddPage) { - newScrollbar.rect = scrollbar->rect; - newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarAddPage, widget); - if (newScrollbar.rect.isValid()) { - if (!(scrollbar->activeSubControls & SC_ScrollBarAddPage)) - newScrollbar.state &= ~(State_Sunken | State_MouseOver); - if (scrollbar->orientation == Qt::Horizontal) { - QRect r = newScrollbar.rect.adjusted(0, 0, 0, -1); - } - else { - QRect r = newScrollbar.rect.adjusted(0, 0,- 1, 0); - } - } - } - if (scrollbar->subControls & SC_ScrollBarFirst) { - newScrollbar.rect = scrollbar->rect; - newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarFirst, widget); - if (newScrollbar.rect.isValid()) { - if (!(scrollbar->activeSubControls & SC_ScrollBarFirst)) - newScrollbar.state &= ~(State_Sunken | State_MouseOver); - QRect r = newScrollbar.rect; - } - } - if (scrollbar->subControls & SC_ScrollBarLast) { - newScrollbar.rect = scrollbar->rect; - newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarLast, widget); - if (newScrollbar.rect.isValid()) { - if (!(scrollbar->activeSubControls & SC_ScrollBarLast)) - newScrollbar.state &= ~(State_Sunken | State_MouseOver); - QRect r = newScrollbar.rect; + d->drawScrollbarHandleDown(painter, &newScrollbar, drawCompleteFrame, secondScrollBar); } } if (scrollbar->subControls & SC_ScrollBarSlider) { - newScrollbar.rect = scrollbar->rect; - newScrollbar.state = saveFlags; - newScrollbar.rect = subControlRect(control, &newScrollbar, SC_ScrollBarSlider, widget); - if (newScrollbar.rect.isValid()) { - if (!(scrollbar->activeSubControls & SC_ScrollBarSlider)) - newScrollbar.state &= ~(State_Sunken | State_MouseOver); - if (scrollbar->orientation == Qt::Horizontal) { - painter->fillRect(newScrollbar.rect,option->palette.button()); - QRect r = newScrollbar.rect; - painter->drawLine(r.topLeft(), r.bottomLeft()); - painter->drawLine(r.topRight(), r.bottomRight()); - if (d->smartphone) { - painter->drawLine(r.topLeft(), r.topRight()); - painter->drawLine(r.bottomLeft(), r.bottomRight()); - } - } - else { - painter->fillRect(newScrollbar.rect,option->palette.button()); - QRect r = newScrollbar.rect; - painter->drawLine(r.topLeft(), r.topRight()); - painter->drawLine(r.bottomLeft(), r.bottomRight()); - if (d->smartphone) { - painter->drawLine(r.topLeft(), r.bottomLeft()); - painter->drawLine(r.topRight(), r.bottomRight()); - } - } - if (scrollbar->state & State_HasFocus) { - QStyleOptionFocusRect fropt; - fropt.QStyleOption::operator=(newScrollbar); - fropt.rect.setRect(newScrollbar.rect.x() + 2, newScrollbar.rect.y() + 2, - newScrollbar.rect.width() - 5, - newScrollbar.rect.height() - 5); - } - } - } - int gripMargin = d->doubleControls ? 4 : 2; - int doubleLines = d->doubleControls ? 2 : 1; - //If there is a frame around the scrollbar (abstractScrollArea), - //then the margin is different, because of the missing frame - int gripMarginFrame = d->doubleControls ? 3 : 1; - if (drawCompleteFrame) - gripMarginFrame = 0; - //draw grips - if (!d->smartphone) - if (scrollbar->orientation == Qt::Horizontal) { - for (int i = -3; i < 3; i += 2) { - painter->drawLine( - QPoint(newScrollbar.rect.center().x() + i * doubleLines + 1, - newScrollbar.rect.top() + gripMargin +gripMarginFrame), - QPoint(newScrollbar.rect.center().x() + i * doubleLines + 1, - newScrollbar.rect.bottom() - gripMargin)); - } - } else { - for (int i = -2; i < 4 ; i += 2) { - painter->drawLine( - QPoint(newScrollbar.rect.left() + gripMargin + gripMarginFrame , - newScrollbar.rect.center().y() + 1 + i * doubleLines - 1), - QPoint(newScrollbar.rect.right() - gripMargin, - newScrollbar.rect.center().y() + 1 + i * doubleLines - 1)); - } - } - if (!d->smartphone) { - QRect r; - if (d->doubleControls) - r = option->rect.adjusted(1, 1, -1, 0); - else - r = option->rect.adjusted(0, 0, -1, 0); - if (drawCompleteFrame && d->doubleControls) - r.adjust(0, 0, 0, -1); - //Check if the scrollbar is part of an abstractItemView and draw the frame according - if (drawCompleteFrame) - painter->drawRect(r); - else - if (scrollbar->orientation == Qt::Horizontal) - painter->drawLine(r.topLeft(), r.topRight()); - else - painter->drawLine(r.topLeft(), r.bottomLeft()); + + newScrollbar.rect = scrollbar->rect; + newScrollbar.state = saveFlags; + newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarSlider, widget); + + if (newScrollbar.rect.isValid()) { + if (!(scrollbar->activeSubControls & SC_ScrollBarSlider)) + newScrollbar.state &= ~(State_Sunken | State_MouseOver); + d->drawScrollbarGrip(painter, &newScrollbar, option, drawCompleteFrame); + } } } painter->restore(); @@ -2378,8 +6016,8 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl isTabWidget = (qobject_cast<QTabWidget *>(parent->parentWidget())); #endif //QT_NO_TABWIDGET - button = subControlRect(control, toolbutton, SC_ToolButton, widget); - menuarea = subControlRect(control, toolbutton, SC_ToolButtonMenu, widget); + button = proxy()->subControlRect(control, toolbutton, SC_ToolButton, widget); + menuarea = proxy()->subControlRect(control, toolbutton, SC_ToolButtonMenu, widget); State buttonFlags = toolbutton->state; if (buttonFlags & State_AutoRaise) { if (!(buttonFlags & State_MouseOver)) { @@ -2396,7 +6034,7 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl if (toolbutton->subControls & SC_ToolButton) { tool.rect = button; tool.state = buttonFlags; - drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); + proxy()->drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); } if (toolbutton->subControls & SC_ToolButtonMenu) { tool.rect = menuarea; @@ -2405,7 +6043,7 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl toolMenu = *toolbutton; toolMenu.state = menuFlags; if (buttonFlags & State_Sunken) - drawPrimitive(PE_PanelButtonTool, &toolMenu, painter, widget); + proxy()->drawPrimitive(PE_PanelButtonTool, &toolMenu, painter, widget); QStyleOption arrowOpt(0); arrowOpt.rect = tool.rect; arrowOpt.palette = tool.palette; @@ -2417,25 +6055,25 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl painter->fillRect(menuarea, option->palette.shadow()); } arrowOpt.state = flags; - drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, painter, widget); + proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, painter, widget); } if (toolbutton->state & State_HasFocus) { QStyleOptionFocusRect focusRect; focusRect.QStyleOption::operator=(*toolbutton); focusRect.rect.adjust(3, 3, -3, -3); if (toolbutton->features & QStyleOptionToolButton::Menu) - focusRect.rect.adjust(0, 0, -pixelMetric(QStyle::PM_MenuButtonIndicator, + focusRect.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, widget), 0); - drawPrimitive(PE_FrameFocusRect, &focusRect, painter, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &focusRect, painter, widget); } QStyleOptionToolButton label = *toolbutton; if (isTabWidget) label.state = toolbutton->state; else label.state = toolbutton->state & State_Enabled; - int fw = pixelMetric(PM_DefaultFrameWidth, option, widget); + int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget); label.rect = button.adjusted(fw, fw, -fw, -fw); - drawControl(CE_ToolButtonLabel, &label, painter, widget); + proxy()->drawControl(CE_ToolButtonLabel, &label, painter, widget); } break; @@ -2449,15 +6087,15 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl painter->setFont(font); QStyleOptionGroupBox groupBoxFont = *groupBox; groupBoxFont.fontMetrics = QFontMetrics(font); - QRect textRect = subControlRect(CC_GroupBox, &groupBoxFont, SC_GroupBoxLabel, widget); - QRect checkBoxRect = subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget).adjusted(0,0,0,0); + QRect textRect = proxy()->subControlRect(CC_GroupBox, &groupBoxFont, SC_GroupBoxLabel, widget); + QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget).adjusted(0,0,0,0); if (groupBox->subControls & QStyle::SC_GroupBoxFrame) { QStyleOptionFrameV2 frame; frame.QStyleOption::operator=(*groupBox); frame.features = groupBox->features; frame.lineWidth = groupBox->lineWidth; frame.midLineWidth = groupBox->midLineWidth; - frame.rect = subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget); + frame.rect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget); painter->save(); QRegion region(groupBox->rect); if (!groupBox->text.isEmpty()) { @@ -2467,7 +6105,7 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl finalRect.adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0); region -= finalRect; } - drawPrimitive(PE_FrameGroupBox, &frame, painter, widget); + proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter, widget); painter->restore(); } // Draw checkbox @@ -2475,7 +6113,7 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl QStyleOptionButton box; box.QStyleOption::operator=(*groupBox); box.rect = checkBoxRect; - drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget); + proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget); } // Draw title if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { @@ -2491,17 +6129,17 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl alignment |= Qt::TextHideMnemonic; if (groupBox->state & State_Enabled) - drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, + proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, groupBox->palette, true, groupBox->text, textColor.isValid() ? QPalette::NoRole : QPalette::Link); else - drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, + proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, groupBox->palette, true, groupBox->text, QPalette::Mid); if (groupBox->state & State_HasFocus) { QStyleOptionFocusRect fropt; fropt.QStyleOption::operator=(*groupBox); fropt.rect = textRect; - drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); } } painter->restore(); @@ -2514,11 +6152,11 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { QBrush editBrush = cmb->palette.brush(QPalette::Base); if ((cmb->subControls & SC_ComboBoxFrame) && cmb->frame) - qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), pixelMetric(PM_ComboBoxFrameWidth, option, widget), &editBrush); + qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget), &editBrush); else painter->fillRect(option->rect, editBrush); State flags = State_None; - QRect ar = subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget); + QRect ar = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget); if ((option->state & State_On)) { painter->fillRect(ar.adjusted(0, 0, 1, 1),cmb->palette.brush(QPalette::Shadow)); } @@ -2534,9 +6172,9 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl arrowOpt.rect = ar; arrowOpt.palette = cmb->palette; arrowOpt.state = flags; - drawPrimitive(PrimitiveElement(PE_IndicatorArrowDownBig), &arrowOpt, painter, widget); + proxy()->drawPrimitive(PrimitiveElement(PE_IndicatorArrowDownBig), &arrowOpt, painter, widget); if (cmb->subControls & SC_ComboBoxEditField) { - QRect re = subControlRect(CC_ComboBox, cmb, SC_ComboBoxEditField, widget); + QRect re = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxEditField, widget); if (cmb->state & State_HasFocus && !cmb->editable) painter->fillRect(re.x(), re.y(), re.width(), re.height(), cmb->palette.brush(QPalette::Highlight)); @@ -2550,11 +6188,11 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl if (cmb->state & State_HasFocus && !cmb->editable) { QStyleOptionFocusRect focus; focus.QStyleOption::operator=(*cmb); - focus.rect = subElementRect(SE_ComboBoxFocusRect, cmb, widget); + focus.rect = proxy()->subElementRect(SE_ComboBoxFocusRect, cmb, widget); focus.state |= State_FocusAtBorder; focus.backgroundColor = cmb->palette.highlight().color(); if ((option->state & State_On)) - drawPrimitive(PE_FrameFocusRect, &focus, painter, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &focus, painter, widget); } } } @@ -2570,8 +6208,8 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl int primitiveElement; if (spinBox->frame && (spinBox->subControls & SC_SpinBoxFrame)) { - QRect r = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxFrame, widget); - qDrawPlainRect(painter, r, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget),0); + QRect r = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxFrame, widget); + qDrawPlainRect(painter, r, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget),0); } QPalette shadePal(option->palette); shadePal.setColor(QPalette::Button, option->palette.light().color()); @@ -2593,13 +6231,13 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl } primitiveElement = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorArrowUpBig : PE_IndicatorArrowUpBig); - copy.rect = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxUp, widget); + copy.rect = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxUp, widget); if (copy.state & (State_Sunken | State_On)) - qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow)); + qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow)); else - qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); - copy.rect.adjust(pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0, -pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0); - drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); + qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); + copy.rect.adjust(proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0, -pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0); + proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); } if (spinBox->subControls & SC_SpinBoxDown) { copy.subControls = SC_SpinBoxDown; @@ -2619,23 +6257,23 @@ void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyl } primitiveElement = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorArrowDownBig : PE_IndicatorArrowDownBig); - copy.rect = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxDown, widget); - qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); + copy.rect = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxDown, widget); + qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); if (copy.state & (State_Sunken | State_On)) - qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow)); + qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow)); else - qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(),pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); + qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base)); copy.rect.adjust(3, 0, -4, 0); if (primitiveElement == PE_IndicatorArrowUp || primitiveElement == PE_IndicatorArrowDown) { - int frameWidth = pixelMetric(PM_SpinBoxFrameWidth, option, widget); + int frameWidth = proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget); copy.rect = copy.rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth); - drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); + proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); } else { - drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); + proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget); } if (spinBox->frame && (spinBox->subControls & SC_SpinBoxFrame)) { - QRect r = subControlRect(CC_SpinBox, spinBox, SC_SpinBoxEditField, widget); + QRect r = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxEditField, widget); } } } @@ -2660,7 +6298,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio h = newSize.height(); int defwidth = 0; if (button->features & QStyleOptionButton::AutoDefaultButton) - defwidth = 2 * pixelMetric(PM_ButtonDefaultIndicator, button, widget); + defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, button, widget); if (w < 75 + defwidth && button->icon.isNull()) w = 75 + defwidth; if (h < 23 + defwidth) @@ -2683,9 +6321,9 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { bool isRadio = (type == CT_RadioButton); QRect irect = visualRect(button->direction, button->rect, - subElementRect(isRadio ? SE_RadioButtonIndicator + proxy()->subElementRect(isRadio ? SE_RadioButtonIndicator : SE_CheckBoxIndicator, button, widget)); - int h = pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight + int h = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight : PM_IndicatorHeight, button, widget); int margins = (!button->icon.isNull() && button->text.isEmpty()) ? 0 : 10; if (d_func()->doubleControls) @@ -2697,7 +6335,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio #ifndef QT_NO_COMBOBOX case CT_ComboBox: if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - int fw = comboBox->frame ? pixelMetric(PM_ComboBoxFrameWidth, option, widget) * 2 : 0; + int fw = comboBox->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget) * 2 : 0; newSize = QSize(newSize.width() + fw + 9, newSize.height() + fw-4); //Nine is a magic Number - See CommonStyle for real magic (23) } break; @@ -2705,7 +6343,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio #ifndef QT_NO_SPINBOX case CT_SpinBox: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { - int fw = spinBox->frame ? pixelMetric(PM_SpinBoxFrameWidth, option, widget) * 2 : 0; + int fw = spinBox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget) * 2 : 0; newSize = QSize(newSize.width() + fw-5, newSize.height() + fw-6); } break; @@ -2719,11 +6357,25 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio newSize = QSize(newSize.width() + 1, newSize.height()); break; case CT_TabBarTab: - newSize += QSize(0,0); + if (d_func()->doubleControls) + newSize = QSize(newSize.width(), 42); + else + newSize = QSize(newSize.width(), 21); break; case CT_HeaderSection: newSize += QSize(4, 2); break; +#ifndef QT_NO_ITEMVIEWS +#ifdef Q_WS_WINCE_WM + case CT_ItemViewItem: + if (d_func()->wm65) + if (d_func()->doubleControls) + newSize.setHeight(46); + else + newSize.setHeight(23); + break; +#endif //Q_WS_WINCE_WM +#endif //QT_NO_ITEMVIEWS default: break; } @@ -2751,7 +6403,7 @@ QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption break; default: break; - #ifndef QT_NO_SLIDER +#ifndef QT_NO_SLIDER case SE_SliderFocusRect: if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { rect = slider->rect; @@ -2762,6 +6414,14 @@ QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption rect.adjust(-1, -1, 0, 0); break; #endif // QT_NO_SLIDER +#ifndef QT_NO_ITEMVIEWS + case SE_ItemViewItemFocusRect: +#ifdef Q_WS_WINCE_WM + if (d->wm65) + rect = QRect(); +#endif + break; +#endif //QT_NO_ITEMVIEWS } return rect; } @@ -2777,10 +6437,21 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp #ifndef QT_NO_SCROLLBAR case CC_ScrollBar: if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - int sliderButtonExtent = pixelMetric(PM_ScrollBarExtent, scrollbar, widget); - int sliderlen; + int sliderButtonExtent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget); float stretchFactor = 1.4f; int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor); + +#ifdef Q_WS_WINCE_WM + if (d->wm65) +#else + if (false) +#endif //Q_WS_WINCE_WM + { + sliderButtonExtent = d->imageScrollbarHandleUp.width(); + sliderButtonExtentDir = d->imageScrollbarHandleUp.height(); + } + + int sliderlen; int maxlen = ((scrollbar->orientation == Qt::Horizontal) ? scrollbar->rect.width() : scrollbar->rect.height()) - (sliderButtonExtentDir * 2); // calculate slider length @@ -2788,7 +6459,7 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp uint range = scrollbar->maximum - scrollbar->minimum; sliderlen = (qint64(scrollbar->pageStep) * maxlen) / (range + scrollbar->pageStep); - int slidermin = pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget); + int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget); if (sliderlen < slidermin || range > INT_MAX / 2) sliderlen = slidermin; if (sliderlen > maxlen) @@ -2883,7 +6554,7 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp #ifndef QT_NO_TOOLBUTTON case CC_ToolButton: if (const QStyleOptionToolButton *toolButton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - int mbi = pixelMetric(PM_MenuButtonIndicator, toolButton, widget); + int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolButton, widget); rect = toolButton->rect; switch (subControl) { case SC_ToolButton: @@ -2909,12 +6580,12 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp #ifndef QT_NO_SLIDER case CC_Slider: if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - int tickOffset = pixelMetric(PM_SliderTickmarkOffset, slider, widget); - int thickness = pixelMetric(PM_SliderControlThickness, slider, widget); + int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); + int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); switch (subControl) { case SC_SliderHandle: { int sliderPos = 0; - int len = pixelMetric(PM_SliderLength, slider, widget); + int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); bool horizontal = slider->orientation == Qt::Horizontal; sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderPosition, @@ -2967,7 +6638,7 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp case CC_SpinBox: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { QSize bs; - int fw = spinBox->frame ? pixelMetric(PM_SpinBoxFrameWidth, spinBox, widget) : 0; + int fw = spinBox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinBox, widget) : 0; bs.setHeight(qMax(d->doubleControls ? 28 : 14, (spinBox->rect.height()))); // 1.6 -approximate golden mean bs.setWidth(qMax(d->doubleControls ? 28 : 14, qMin((bs.height()*7/8), (spinBox->rect.width() / 8)))); @@ -2978,13 +6649,17 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp rx = x - fw; switch (subControl) { case SC_SpinBoxUp: - rect = QRect(x+pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0 , bs.width(), bs.height()); + rect = QRect(x + proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0 , bs.width(), bs.height()); break; case SC_SpinBoxDown: rect = QRect(x + bs.width(), 0, bs.width(), bs.height()); break; case SC_SpinBoxEditField: + if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) { + rect = QRect(lx, fw, spinBox->rect.width() - 2*fw - 2, spinBox->rect.height() - 2*fw); + } else { rect = QRect(lx, fw, rx-2, spinBox->rect.height() - 2*fw); + } break; case SC_SpinBoxFrame: rect = spinBox->rect; @@ -3024,7 +6699,7 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp } int frameWidth = 0; if (groupBox->text.size()) { - frameWidth = pixelMetric(PM_DefaultFrameWidth, groupBox, widget); + frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget); rect = frameRect.adjusted(frameWidth, frameWidth + topHeight + labelMargin, -frameWidth, -frameWidth); } else { @@ -3045,8 +6720,8 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp rect.setHeight(h); else rect.setHeight(0); - int indicatorWidth = pixelMetric(PM_IndicatorWidth, option, widget); - int indicatorSpace = pixelMetric(PM_CheckBoxLabelSpacing, option, widget) - 1; + int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); + int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, option, widget) - 1; bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox; int checkBoxSize = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0; @@ -3060,7 +6735,7 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp int left = 2; // Adjust for check box if (subControl == SC_GroupBoxCheckBox) { - int indicatorHeight = pixelMetric(PM_IndicatorHeight, option, widget); + int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); left = ltr ? totalRect.left() : (totalRect.right() - indicatorWidth); int top = totalRect.top() + (fontMetrics.height() - indicatorHeight) / 2; totalRect.setRect(left, top, indicatorWidth, indicatorHeight); @@ -3256,7 +6931,6 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co case PM_RadioButtonLabelSpacing: ret = d->doubleControls ? 6 * 2 : 6; break; - break; // Returns the number of pixels to use for the business part of the // slider (i.e., the non-tickmark portion). The remaining space is shared // equally between the tickmark regions. @@ -3275,7 +6949,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co } int thick = 8; if (ticks != QSlider::TicksBothSides && ticks != QSlider::NoTicks) - thick += pixelMetric(PM_SliderLength, sl, widget) / 4; + thick += proxy()->pixelMetric(PM_SliderLength, sl, widget) / 4; space -= thick; if (space > 0) @@ -3297,7 +6971,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co d->doubleControls ? ret = 64 : ret = 32; break; case PM_IconViewIconSize: - ret = pixelMetric(PM_LargeIconSize, opt, widget); + ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget); break; case PM_ToolBarIconSize: d->doubleControls ? ret = 2 * windowsMobileIconSize : ret = windowsMobileIconSize; @@ -3318,15 +6992,36 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co d->doubleControls ? ret = 42 : ret = 21; break; case PM_ScrollBarSliderMin: - d->doubleControls ? ret = 36 : ret = 18; +#ifdef Q_WS_WINCE_WM + if (d->wm65) +#else + if (false) +#endif + { + d->doubleControls ? ret = 68 : ret = 34; + } else { + d->doubleControls ? ret = 36 : ret = 18; + } break; case PM_ScrollBarExtent: { - //Check if the scrollbar is part of an abstractItemView and set size according + if (d->smartphone) ret = 9; else d->doubleControls ? ret = 25 : ret = 13; + +#ifdef Q_WS_WINCE_WM + if (d->wm65) +#else + if (false) +#endif + { + d->doubleControls ? ret = 26 : ret = 13; + break; + } + #ifndef QT_NO_SCROLLAREA + //Check if the scrollbar is part of an abstractItemView and set size according if (widget) if (QWidget *parent = widget->parentWidget()) if (qobject_cast<QAbstractScrollArea *>(parent->parentWidget())) @@ -3466,6 +7161,10 @@ QPixmap QWindowsMobileStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPi switch (iconMode) { case QIcon::Selected: { +#ifdef Q_WS_WINCE_WM + if (d_func()->wm65) + return pixmap; +#endif //Q_WS_WINCE_WM QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); int imgh = img.height(); int imgw = img.width(); diff --git a/src/gui/styles/qwindowsmobilestyle_p.h b/src/gui/styles/qwindowsmobilestyle_p.h index 4f20bce3..59c07d8 100644 --- a/src/gui/styles/qwindowsmobilestyle_p.h +++ b/src/gui/styles/qwindowsmobilestyle_p.h @@ -67,6 +67,9 @@ public: QWindowsMobileStylePrivate(); bool doubleControls; bool smartphone; +#ifdef Q_WS_WINCE_WM + bool wm65; +#endif QImage imageRadioButton; QImage imageRadioButtonChecked; @@ -85,6 +88,42 @@ public: QImage imageMaximize; QImage imageNormalize; QImage imageMinimize; + + void setupWindowsMobileStyle65(); + +#ifdef Q_WS_WINCE_WM + //Windows Mobile 6.5 images + QImage imageScrollbarHandleUp; + QImage imageScrollbarHandleDown; + QImage imageScrollbarHandleUpHigh; + QImage imageScrollbarHandleDownHigh; + QImage imageScrollbarGripUp; + QImage imageScrollbarGripDown; + QImage imageScrollbarGripMiddle; + QImage imageListViewHighlightCornerLeft; + QImage imageListViewHighlightCornerRight; + QImage imageListViewHighlightMiddle; + QImage imageTabEnd; + QImage imageTabSelectedEnd; + QImage imageTabSelectedBegin; + QImage imageTabMiddle; + + QColor currentTintHigh; + QColor currentTintButton; + + void tintImagesHigh(QColor color); + void tintImagesButton(QColor color); + void tintListViewHighlight(QColor color); + void drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect = QRect()); + + void drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); + void drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); + void drawScrollbarGroove(QPainter *p, const QStyleOptionSlider *opt); + void drawScrollbarGrip(QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame); + void drawTabBarTab(QPainter *p, const QStyleOptionTab *tab); + +#endif //Q_WS_WINCE_WM + }; QT_END_NAMESPACE diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp index cb76876..96d5619 100644 --- a/src/gui/widgets/qdatetimeedit.cpp +++ b/src/gui/widgets/qdatetimeedit.cpp @@ -2270,6 +2270,7 @@ void QDateTimeEdit::paintEvent(QPaintEvent *event) optCombo.init(this); optCombo.editable = true; + optCombo.frame = opt.frame; optCombo.subControls = opt.subControls; optCombo.activeSubControls = opt.activeSubControls; optCombo.state = opt.state; diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index a3475c7..3f14fdf 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -261,11 +261,21 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) if (mask.format() == QImage::Format_RGB32) { glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, m_height - c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); } else { - // If the width of the uploaded data is not a multiple of four bytes, we get some garbage - // in the glyph cache, probably because of a driver bug. - // Convert to ARGB32 to get a multiple of 4 bytes per line. - mask = mask.convertToFormat(QImage::Format_ARGB32); - glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); +#ifdef QT_OPENGL_ES2 + glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits()); +#else + // glTexSubImage2D() might cause some garbage to appear in the texture if the mask width is + // not a multiple of four bytes. The bug appeared on a computer with 32-bit Windows Vista + // and nVidia GeForce 8500GT. GL_UNPACK_ALIGNMENT is set to four bytes, 'mask' has a + // multiple of four bytes per line, and most of the glyph shows up correctly in the + // texture, which makes me think that this is a driver bug. + // One workaround is to make sure the mask width is a multiple of four bytes, for instance + // by converting it to a format with four bytes per pixel. Another is to copy one line at a + // time. + + for (uint i = 0; i < maskHeight; ++i) + glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, maskWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, mask.scanLine(i)); +#endif } } diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 4fd0c11..fccc622 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -158,7 +158,7 @@ void QPSQLDriverPrivate::appendTables(QStringList &tl, QSqlQuery &t, QChar type) class QPSQLResultPrivate { public: - QPSQLResultPrivate(QPSQLResult *qq): q(qq), driver(0), result(0), currentSize(-1) {} + QPSQLResultPrivate(QPSQLResult *qq): q(qq), driver(0), result(0), currentSize(-1), preparedQueriesEnabled(false) {} QPSQLResult *q; const QPSQLDriverPrivate *driver; diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp index eaec02f..8a2cc44 100644 --- a/src/testlib/qbenchmark.cpp +++ b/src/testlib/qbenchmark.cpp @@ -192,11 +192,18 @@ void QBenchmarkTestMethodData::setResult(qint64 value) */ QTest::QBenchmarkIterationController::QBenchmarkIterationController(RunMode runMode) { - QTest::beginBenchmarkMeasurement(); i = 0; if (runMode == RunOnce) QBenchmarkTestMethodData::current->runOnce = true; + QTest::beginBenchmarkMeasurement(); +} + +QTest::QBenchmarkIterationController::QBenchmarkIterationController() +{ + i = 0; + QTest::beginBenchmarkMeasurement(); } + /*! \internal */ QTest::QBenchmarkIterationController::~QBenchmarkIterationController() diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h index 87d34e7..a9f38de 100644 --- a/src/testlib/qbenchmark.h +++ b/src/testlib/qbenchmark.h @@ -65,6 +65,7 @@ class Q_TESTLIB_EXPORT QBenchmarkIterationController { public: enum RunMode { RepeatUntilValidMeasurement, RunOnce }; + QBenchmarkIterationController(); QBenchmarkIterationController(RunMode runMode); ~QBenchmarkIterationController(); bool isDone(); @@ -75,7 +76,7 @@ public: } #define QBENCHMARK \ - for (QTest::QBenchmarkIterationController __iteration_controller(QTest::QBenchmarkIterationController::RepeatUntilValidMeasurement); \ + for (QTest::QBenchmarkIterationController __iteration_controller; \ __iteration_controller.isDone() == false; __iteration_controller.next()) #define QBENCHMARK_ONCE \ |