Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/styles/qplastiquestyle.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    5151
    5252#include "qwindowsstyle_p.h"
    53 #include <private/qstylehelper_p.h>
    5453#include <qapplication.h>
    5554#include <qbitmap.h>
     
    5756#include <qcheckbox.h>
    5857#include <qcombobox.h>
    59 #include <qdatetime.h>
    6058#include <qdebug.h>
    6159#include <qdialogbuttonbox.h>
     
    8280#include <qstyleoption.h>
    8381#include <qtextedit.h>
     82
    8483#include <qtoolbar.h>
    8584#include <qtoolbox.h>
     
    8988#include <qvarlengtharray.h>
    9089#include <limits.h>
     90
    9191
    9292QT_BEGIN_NAMESPACE
     
    489489        QPixmap texture = brush->texture();
    490490        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());
    492494        if (!QPixmapCache::find(name, pixmap)) {
    493495            QImage image = texture.toImage();
     
    550552        QPixmap texture = brush.texture();
    551553        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
    553558        if (!QPixmapCache::find(name, pixmap)) {
    554559            QImage image = texture.toImage();
     
    609614        QPixmap texture = brush.texture();
    610615        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
    612620        if (!QPixmapCache::find(name, pixmap)) {
    613621            QImage image = texture.toImage();
     
    733741                                       const QColor &gradientStop)
    734742{
    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
    737749    QPixmap cache;
    738750    QPainter *p = painter;
     
    981993    QList<QProgressBar *> bars;
    982994    int progressBarAnimateTimer;
    983     QTime timer;
     995    Q timer;
    984996#endif
    985997};
     
    10931105
    10941106    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);
    11031107    QColor alphaCornerColor;
    11041108    if (widget) {
     
    11081112        alphaCornerColor = mergedColors(option->palette.background().color(), borderColor);
    11091113    }
    1110     QColor alphaInnerColor = mergedColors(highlightedLightInnerBorderColor, gradientStartColor);
    1111     QColor alphaInnerColorNoHover = mergedColors(borderColor, gradientStartColor);
    11121114    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;
    11171115
    11181116    switch (element) {
     
    20582056
    20592057            int lowerTop = selected ? 0 : 3; // to make the selected tab bigger than the rest
    2060             QRect adjustedRect;
    20612058            bool atEnd = (tab->position == QStyleOptionTab::End) || onlyTab;
    20622059            bool atBeginning = ((tab->position == QStyleOptionTab::Beginning) || onlyTab)
     
    58475844{
    58485845    QWindowsStyle::polish(pal);
    5849     pal.setBrush(QPalette::AlternateBase, pal.base().color().darker(110));
    58505846#ifdef Q_WS_MAC
    58515847    pal.setBrush(QPalette::Shadow, Qt::black);
Note: See TracChangeset for help on using the changeset viewer.