Changeset 846 for trunk/src/gui/styles/qplastiquestyle.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/qplastiquestyle.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 51 51 52 52 #include "qwindowsstyle_p.h" 53 #include <private/qstylehelper_p.h>54 53 #include <qapplication.h> 55 54 #include <qbitmap.h> … … 57 56 #include <qcheckbox.h> 58 57 #include <qcombobox.h> 59 #include <qdatetime.h>60 58 #include <qdebug.h> 61 59 #include <qdialogbuttonbox.h> … … 82 80 #include <qstyleoption.h> 83 81 #include <qtextedit.h> 82 84 83 #include <qtoolbar.h> 85 84 #include <qtoolbox.h> … … 89 88 #include <qvarlengtharray.h> 90 89 #include <limits.h> 90 91 91 92 92 QT_BEGIN_NAMESPACE … … 489 489 QPixmap texture = brush->texture(); 490 490 QPixmap pixmap; 491 QString name = QString::fromLatin1("qbrushtexture-alpha-%1-%2").arg(alpha).arg(texture.cacheKey()); 491 QString name = QLatin1Literal("qbrushtexture-alpha") 492 % HexString<qreal>(alpha) 493 % HexString<qint64>(texture.cacheKey()); 492 494 if (!QPixmapCache::find(name, pixmap)) { 493 495 QImage image = texture.toImage(); … … 550 552 QPixmap texture = brush.texture(); 551 553 QPixmap pixmap; 552 QString name = QString::fromLatin1("qbrushtexture-light-%1-%2").arg(light).arg(texture.cacheKey()); 554 QString name = QLatin1Literal("qbrushtexture-light") 555 % HexString<int>(light) 556 % HexString<qint64>(texture.cacheKey()); 557 553 558 if (!QPixmapCache::find(name, pixmap)) { 554 559 QImage image = texture.toImage(); … … 609 614 QPixmap texture = brush.texture(); 610 615 QPixmap pixmap; 611 QString name = QString::fromLatin1("qbrushtexture-dark-%1-%2").arg(dark).arg(brush.texture().cacheKey()); 616 QString name = QLatin1Literal("qbrushtexture-dark") 617 % HexString<int>(dark) 618 % HexString<qint64>(texture.cacheKey()); 619 612 620 if (!QPixmapCache::find(name, pixmap)) { 613 621 QImage image = texture.toImage(); … … 733 741 const QColor &gradientStop) 734 742 { 735 QString gradientName; 736 gradientName.sprintf("%dx%d-%x-%x", rect.width(), rect.height(), gradientStart.rgba(), gradientStop.rgba()); 743 QString gradientName = QLatin1Literal("qplastique-g") 744 % HexString<int>(rect.width()) 745 % HexString<int>(rect.height()) 746 % HexString<QRgb>(gradientStart.rgba()) 747 % HexString<QRgb>(gradientStop.rgba()); 748 737 749 QPixmap cache; 738 750 QPainter *p = painter; … … 981 993 QList<QProgressBar *> bars; 982 994 int progressBarAnimateTimer; 983 Q Timetimer;995 Q timer; 984 996 #endif 985 997 }; … … 1093 1105 1094 1106 QColor borderColor = option->palette.background().color().darker(178); 1095 QColor gradientStartColor = option->palette.button().color().lighter(104);1096 QColor gradientStopColor = option->palette.button().color().darker(105);1097 QColor highlightedGradientStartColor = option->palette.button().color().lighter(101);1098 QColor highlightedGradientStopColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 85);1099 QColor highlightedBaseGradientStartColor = option->palette.base().color();1100 QColor highlightedBaseGradientStopColor = mergedColors(option->palette.base().color().darker(105), option->palette.highlight().color(), 70);1101 QColor highlightedDarkInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 35);1102 QColor highlightedLightInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 58);1103 1107 QColor alphaCornerColor; 1104 1108 if (widget) { … … 1108 1112 alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); 1109 1113 } 1110 QColor alphaInnerColor = mergedColors(highlightedLightInnerBorderColor, gradientStartColor);1111 QColor alphaInnerColorNoHover = mergedColors(borderColor, gradientStartColor);1112 1114 QColor alphaTextColor = mergedColors(option->palette.background().color(), option->palette.text().color()); 1113 QColor alphaLightTextColor = mergedColors(option->palette.background().color().lighter(250), option->palette.text().color().lighter(250));1114 QColor lightShadow = option->palette.button().color().lighter(105);1115 QColor shadowGradientStartColor = option->palette.button().color().darker(115);1116 QColor shadow = shadowGradientStartColor;1117 1115 1118 1116 switch (element) { … … 2058 2056 2059 2057 int lowerTop = selected ? 0 : 3; // to make the selected tab bigger than the rest 2060 QRect adjustedRect;2061 2058 bool atEnd = (tab->position == QStyleOptionTab::End) || onlyTab; 2062 2059 bool atBeginning = ((tab->position == QStyleOptionTab::Beginning) || onlyTab) … … 5847 5844 { 5848 5845 QWindowsStyle::polish(pal); 5849 pal.setBrush(QPalette::AlternateBase, pal.base().color().darker(110));5850 5846 #ifdef Q_WS_MAC 5851 5847 pal.setBrush(QPalette::Shadow, Qt::black);
Note:
See TracChangeset
for help on using the changeset viewer.