Changeset 846 for trunk/src/gui/styles/qwindowsstyle.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/styles/qwindowsstyle.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 42 42 #include "qwindowsstyle.h" 43 43 #include "qwindowsstyle_p.h" 44 #include <private/qstylehelper_p.h>45 44 46 45 #if !defined(QT_NO_STYLE_WINDOWS) || defined(QT_PLUGIN) 47 46 48 #include "qlibrary.h"47 #include <private/qsystemlibrary_p.h> 49 48 #include "qapplication.h" 50 49 #include "qbitmap.h" … … 71 70 #include <qmath.h> 72 71 73 74 72 #ifdef Q_WS_X11 75 73 #include "qfileinfo.h" … … 77 75 #include <private/qt_x11_p.h> 78 76 #endif 77 78 #include <private/qstylehelper_p.h> 79 79 80 80 QT_BEGIN_NAMESPACE … … 127 127 if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA 128 128 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) { 129 Q Library shellLib(QLatin1String("shell32"));129 QSystemLibrary shellLib(QLatin1String("shell32")); 130 130 pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo"); 131 131 } 132 132 #endif 133 startTime.start(); 133 134 } 134 135 … … 506 507 #ifndef Q_OS_WINCE 507 508 NONCLIENTMETRICS ncm; 508 ncm.cbSize = sizeof(NONCLIENTMETRICS);509 ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONT); 509 510 if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0)) 510 511 ret = qMax(ncm.iScrollHeight, ncm.iScrollWidth); … … 930 931 { 931 932 #ifdef Q_OS_WINCE 932 HMODULE hmod = LoadLibrary(L"ceshell .dll");933 HMODULE hmod = LoadLibrary(L"ceshell"); 933 934 #else 934 HMODULE hmod = LoadLibrary(L"shell32.dll");935 HMODULE hmod = QSystemLibrary::load(L"shell32"); 935 936 #endif 936 937 if( hmod ) { … … 1397 1398 int size = qMin(r.height(), r.width()); 1398 1399 QPixmap pixmap; 1399 QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") + QLatin1String(metaObject()->className()), opt, QSize(size, size)) 1400 + QLatin1Char('-') + QString::number(pe); 1400 QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") 1401 % QLatin1String(metaObject()->className()), opt, QSize(size, size)) 1402 % HexString<uint>(pe); 1401 1403 if (!QPixmapCache::find(pixmapName, pixmap)) { 1402 1404 int border = size/5; 1403 1405 int sqsize = 2*(size/2); 1404 QImage image(sqsize, sqsize, QImage::Format_ARGB32 );1405 image.fill( Qt::transparent);1406 QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); 1407 image.fill(0); 1406 1408 QPainter imagePainter(&image); 1407 1409 … … 1920 1922 } 1921 1923 1922 int xm = QWindowsStylePrivate::windowsItemFrame + checkcol + QWindowsStylePrivate::windowsItemHMargin;1924 int xm = int(QWindowsStylePrivate::windowsItemFrame) + checkcol + int(QWindowsStylePrivate::windowsItemHMargin); 1923 1925 int xpos = menuitem->rect.x() + xm; 1924 1926 QRect textRect(xpos, y + QWindowsStylePrivate::windowsItemVMargin, … … 2404 2406 case CE_ProgressBarContents: 2405 2407 if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { 2406 2407 2408 QRect rect = pb->rect; 2409 if (!rect.isValid()) 2410 return; 2411 2408 2412 bool vertical = false; 2409 2413 bool inverted = false; … … 3114 3118 ©.palette.brush(QPalette::Button)); 3115 3119 copy.rect.adjust(4, 1, -5, -1); 3116 if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) ) { 3120 if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)) 3121 && proxy()->styleHint(SH_EtchDisabledText, opt, widget) ) 3122 { 3117 3123 QStyleOptionSpinBox lightCopy = copy; 3118 3124 lightCopy.rect.adjust(1, 1, 1, 1); … … 3147 3153 ©.palette.brush(QPalette::Button)); 3148 3154 copy.rect.adjust(4, 0, -5, -1); 3149 if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) ) { 3155 if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)) 3156 && proxy()->styleHint(SH_EtchDisabledText, opt, widget) ) 3157 { 3150 3158 QStyleOptionSpinBox lightCopy = copy; 3151 3159 lightCopy.rect.adjust(1, 1, 1, 1); … … 3228 3236 int checkcol = qMax<int>(maxpmw, QWindowsStylePrivate::windowsCheckMarkWidth); // Windows always shows a check column 3229 3237 w += checkcol; 3230 w += QWindowsStylePrivate::windowsRightBorder+ 10;3238 w += int(QWindowsStylePrivate::windowsRightBorder) + 10; 3231 3239 sz.setWidth(w); 3232 3240 }
Note:
See TracChangeset
for help on using the changeset viewer.