Introduce new style Fusion

This is a new non-native style for Qt.
It is intended as a replacement for the now aging
Plastique and Cleanlooks styles.

Change-Id: I30c0518a69e4e3b8b2b05ee7d84c3a5a1f307578
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
Jens Bache-Wiig 2012-09-21 19:53:28 +02:00 committed by The Qt Project
parent 8b6de46771
commit f45afd7155
11 changed files with 4004 additions and 137 deletions

2
configure vendored
View File

@ -727,7 +727,7 @@ mkdir -p "$outpath/config.tests"
rm -f "$outpath/config.tests/.qmake.cache"
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
QMakeVar add styles "cde mac motif plastique cleanlooks windows"
QMakeVar add styles "cde mac motif fusion plastique cleanlooks windows"
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,111 @@
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, 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.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QFUSIONSTYLE_H
#define QFUSIONSTYLE_H
#include <QtWidgets/qcommonstyle.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if !defined(QT_NO_STYLE_FUSION)
class QFusionStylePrivate;
class Q_WIDGETS_EXPORT QFusionStyle : public QCommonStyle
{
Q_OBJECT
Q_DECLARE_PRIVATE(QFusionStyle)
public:
QFusionStyle();
~QFusionStyle();
QPalette standardPalette () const;
void drawPrimitive(PrimitiveElement elem,
const QStyleOption *option,
QPainter *painter, const QWidget *widget = 0) const;
void drawControl(ControlElement ce, const QStyleOption *option, QPainter *painter,
const QWidget *widget) const;
int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
QPainter *painter, const QWidget *widget) const;
QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const;
QSize sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &size, const QWidget *widget) const;
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
const QPoint &pt, const QWidget *w = 0) const;
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
SubControl sc, const QWidget *widget) const;
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
const QStyleOption *opt) const;
int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
QStyleHintReturn *returnData = 0) const;
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const;
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0,
const QWidget *widget = 0) const;
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
const QWidget *widget = 0) const;
void drawItemPixmap(QPainter *painter, const QRect &rect,
int alignment, const QPixmap &pixmap) const;
void drawItemText(QPainter *painter, const QRect &rect,
int flags, const QPalette &pal, bool enabled,
const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const;
void polish(QWidget *widget);
void polish(QApplication *app);
void polish(QPalette &pal);
void unpolish(QWidget *widget);
void unpolish(QApplication *app);
protected:
QFusionStyle(QFusionStylePrivate &dd);
};
#endif // QT_NO_STYLE_FUSION
QT_END_NAMESPACE
QT_END_HEADER
#endif // QFUSIONSTYLE_H

View File

@ -0,0 +1,129 @@
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, 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.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QFUSIONSTYLE_P_H
#define QFUSIONSTYLE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
// file may change from version to version without notice, or even be removed.
//
// We mean it.
//
#include "qcommonstyle.h"
#include "qcommonstyle_p.h"
#ifndef QT_NO_STYLE_FUSION
QT_BEGIN_NAMESPACE
class QFusionStylePrivate : public QCommonStylePrivate
{
Q_DECLARE_PUBLIC(QFusionStyle)
public:
QFusionStylePrivate();
// Used for grip handles
QColor lightShade() const {
return QColor(255, 255, 255, 90);
}
QColor darkShade() const {
return QColor(0, 0, 0, 60);
}
QColor topShadow() const {
return QColor(0, 0, 0, 18);
}
QColor innerContrastLine() const {
return QColor(255, 255, 255, 30);
}
QColor highlight(const QPalette &pal) const {
return pal.color(QPalette::Active, QPalette::Highlight);
}
QColor outline(const QPalette &pal) const {
if (!pal.window().texture().isNull())
return QColor(0, 0, 0, 160);
return pal.background().color().darker(140);
}
QColor highlightedOutline(const QPalette &pal) const {
QColor highlightedOutline = pal.highlight().color().darker(125);
if (highlightedOutline.value() > 160)
highlightedOutline.setHsl(highlightedOutline.hue(), highlightedOutline.saturation(), 160);
return highlightedOutline;
}
QColor tabFrameColor(const QPalette &pal) const {
if (!pal.button().texture().isNull())
return QColor(255, 255, 255, 8);
return buttonColor(pal).lighter(104);
}
QColor buttonColor(const QPalette &pal) const {
QColor buttonColor = pal.button().color();
int val = qGray(buttonColor.rgb());
buttonColor = buttonColor.lighter(100 + qMax(0, (180- val)/6));
buttonColor.setHsv(buttonColor.hue(), buttonColor.saturation() * 0.75, buttonColor.value());
return buttonColor;
}
enum {
menuItemHMargin = 3, // menu item hor text margin
menuArrowHMargin = 6, // menu arrow horizontal margin
menuRightBorder = 15, // right border on menus
menuCheckMarkWidth = 12 // checkmarks width on menus
};
};
QT_END_NAMESPACE
#endif // QT_NO_STYLE_FUSION
#endif //QFUSIONSTYLE_P_H

View File

@ -1,135 +1,137 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/qt-project.org/styles/commonstyle">
<file>images/filelink-16.png</file>
<file>images/filelink-32.png</file>
<file>images/filelink-128.png</file>
<file>images/file-16.png</file>
<file>images/file-32.png</file>
<file>images/file-128.png</file>
<file>images/newdirectory-16.png</file>
<file>images/newdirectory-32.png</file>
<file>images/newdirectory-128.png</file>
<file>images/parentdir-16.png</file>
<file>images/parentdir-32.png</file>
<file>images/parentdir-128.png</file>
<file>images/dvd-16.png</file>
<file>images/dvd-32.png</file>
<file>images/dvd-128.png</file>
<file>images/cdr-16.png</file>
<file>images/cdr-32.png</file>
<file>images/cdr-128.png</file>
<file>images/floppy-16.png</file>
<file>images/floppy-32.png</file>
<file>images/floppy-128.png</file>
<file>images/harddrive-16.png</file>
<file>images/harddrive-32.png</file>
<file>images/harddrive-128.png</file>
<file>images/trash-16.png</file>
<file>images/trash-32.png</file>
<file>images/trash-128.png</file>
<file>images/networkdrive-16.png</file>
<file>images/networkdrive-32.png</file>
<file>images/networkdrive-128.png</file>
<file>images/computer-16.png</file>
<file>images/computer-32.png</file>
<file>images/desktop-16.png</file>
<file>images/desktop-32.png</file>
<file>images/dirclosed-16.png</file>
<file>images/dirclosed-32.png</file>
<file>images/dirclosed-128.png</file>
<file>images/dirlink-16.png</file>
<file>images/dirlink-32.png</file>
<file>images/dirlink-128.png</file>
<file>images/diropen-16.png</file>
<file>images/diropen-32.png</file>
<file>images/diropen-128.png</file>
<file>images/left-16.png</file>
<file>images/left-32.png</file>
<file>images/left-128.png</file>
<file>images/right-16.png</file>
<file>images/right-32.png</file>
<file>images/right-128.png</file>
<file>images/up-16.png</file>
<file>images/up-32.png</file>
<file>images/up-128.png</file>
<file>images/down-16.png</file>
<file>images/down-32.png</file>
<file>images/down-128.png</file>
<file>images/filecontents-16.png</file>
<file>images/filecontents-32.png</file>
<file>images/filecontents-128.png</file>
<file>images/fileinfo-16.png</file>
<file>images/fileinfo-32.png</file>
<file>images/fileinfo-128.png</file>
<file>images/viewdetailed-16.png</file>
<file>images/viewdetailed-32.png</file>
<file>images/viewdetailed-128.png</file>
<file>images/viewlist-16.png</file>
<file>images/viewlist-32.png</file>
<file>images/viewlist-128.png</file>
<file>images/fontbitmap-16.png</file>
<file>images/fonttruetype-16.png</file>
<file>images/standardbutton-apply-128.png</file>
<file>images/standardbutton-apply-16.png</file>
<file>images/standardbutton-apply-32.png</file>
<file>images/standardbutton-cancel-128.png</file>
<file>images/standardbutton-cancel-16.png</file>
<file>images/standardbutton-cancel-32.png</file>
<file>images/standardbutton-clear-128.png</file>
<file>images/standardbutton-clear-16.png</file>
<file>images/standardbutton-clear-32.png</file>
<file>images/standardbutton-close-128.png</file>
<file>images/standardbutton-close-16.png</file>
<file>images/standardbutton-close-32.png</file>
<file>images/standardbutton-delete-128.png</file>
<file>images/standardbutton-delete-16.png</file>
<file>images/standardbutton-delete-32.png</file>
<file>images/standardbutton-help-128.png</file>
<file>images/standardbutton-help-16.png</file>
<file>images/standardbutton-help-32.png</file>
<file>images/standardbutton-no-128.png</file>
<file>images/standardbutton-no-16.png</file>
<file>images/standardbutton-no-32.png</file>
<file>images/standardbutton-ok-128.png</file>
<file>images/standardbutton-ok-16.png</file>
<file>images/standardbutton-ok-32.png</file>
<file>images/standardbutton-open-128.png</file>
<file>images/standardbutton-open-16.png</file>
<file>images/standardbutton-open-32.png</file>
<file>images/standardbutton-save-128.png</file>
<file>images/standardbutton-save-16.png</file>
<file>images/standardbutton-save-32.png</file>
<file>images/standardbutton-yes-128.png</file>
<file>images/standardbutton-yes-16.png</file>
<file>images/standardbutton-yes-32.png</file>
<file>images/standardbutton-closetab-16.png</file>
<file>images/standardbutton-closetab-down-16.png</file>
<file>images/standardbutton-closetab-hover-16.png</file>
<file>images/refresh-24.png</file>
<file>images/refresh-32.png</file>
<file>images/stop-24.png</file>
<file>images/stop-32.png</file>
<file>images/media-stop-16.png</file>
<file>images/media-stop-32.png</file>
<file>images/media-play-16.png</file>
<file>images/media-play-32.png</file>
<file>images/media-pause-16.png</file>
<file>images/media-pause-32.png</file>
<file>images/media-seek-forward-16.png</file>
<file>images/media-seek-forward-32.png</file>
<file>images/media-seek-backward-16.png</file>
<file>images/media-seek-backward-32.png</file>
<file>images/media-skip-forward-16.png</file>
<file>images/media-skip-forward-32.png</file>
<file>images/media-skip-backward-16.png</file>
<file>images/media-skip-backward-32.png</file>
<file>images/media-volume-16.png</file>
<file>images/media-volume-muted-16.png</file>
</qresource>
<qresource prefix="/qt-project.org/styles/macstyle">
<file>images/closedock-16.png</file>
<file>images/closedock-down-16.png</file>
<file>images/dockdock-16.png</file>
<file>images/dockdock-down-16.png</file>
</qresource>
<RCC>
<qresource prefix="/qt-project.org/styles/commonstyle">
<file>images/filelink-16.png</file>
<file>images/filelink-32.png</file>
<file>images/filelink-128.png</file>
<file>images/file-16.png</file>
<file>images/file-32.png</file>
<file>images/file-128.png</file>
<file>images/newdirectory-16.png</file>
<file>images/newdirectory-32.png</file>
<file>images/newdirectory-128.png</file>
<file>images/parentdir-16.png</file>
<file>images/parentdir-32.png</file>
<file>images/parentdir-128.png</file>
<file>images/dvd-16.png</file>
<file>images/dvd-32.png</file>
<file>images/dvd-128.png</file>
<file>images/cdr-16.png</file>
<file>images/cdr-32.png</file>
<file>images/cdr-128.png</file>
<file>images/floppy-16.png</file>
<file>images/floppy-32.png</file>
<file>images/floppy-128.png</file>
<file>images/harddrive-16.png</file>
<file>images/harddrive-32.png</file>
<file>images/harddrive-128.png</file>
<file>images/trash-16.png</file>
<file>images/trash-32.png</file>
<file>images/trash-128.png</file>
<file>images/networkdrive-16.png</file>
<file>images/networkdrive-32.png</file>
<file>images/networkdrive-128.png</file>
<file>images/computer-16.png</file>
<file>images/computer-32.png</file>
<file>images/desktop-16.png</file>
<file>images/desktop-32.png</file>
<file>images/dirclosed-16.png</file>
<file>images/dirclosed-32.png</file>
<file>images/dirclosed-128.png</file>
<file>images/dirlink-16.png</file>
<file>images/dirlink-32.png</file>
<file>images/dirlink-128.png</file>
<file>images/diropen-16.png</file>
<file>images/diropen-32.png</file>
<file>images/diropen-128.png</file>
<file>images/left-16.png</file>
<file>images/left-32.png</file>
<file>images/left-128.png</file>
<file>images/right-16.png</file>
<file>images/right-32.png</file>
<file>images/right-128.png</file>
<file>images/up-16.png</file>
<file>images/up-32.png</file>
<file>images/up-128.png</file>
<file>images/down-16.png</file>
<file>images/down-32.png</file>
<file>images/down-128.png</file>
<file>images/filecontents-16.png</file>
<file>images/filecontents-32.png</file>
<file>images/filecontents-128.png</file>
<file>images/fileinfo-16.png</file>
<file>images/fileinfo-32.png</file>
<file>images/fileinfo-128.png</file>
<file>images/viewdetailed-16.png</file>
<file>images/viewdetailed-32.png</file>
<file>images/viewdetailed-128.png</file>
<file>images/viewlist-16.png</file>
<file>images/viewlist-32.png</file>
<file>images/viewlist-128.png</file>
<file>images/fontbitmap-16.png</file>
<file>images/fonttruetype-16.png</file>
<file>images/standardbutton-apply-128.png</file>
<file>images/standardbutton-apply-16.png</file>
<file>images/standardbutton-apply-32.png</file>
<file>images/standardbutton-cancel-128.png</file>
<file>images/standardbutton-cancel-16.png</file>
<file>images/standardbutton-cancel-32.png</file>
<file>images/standardbutton-clear-128.png</file>
<file>images/standardbutton-clear-16.png</file>
<file>images/standardbutton-clear-32.png</file>
<file>images/standardbutton-close-128.png</file>
<file>images/standardbutton-close-16.png</file>
<file>images/standardbutton-close-32.png</file>
<file>images/standardbutton-delete-128.png</file>
<file>images/standardbutton-delete-16.png</file>
<file>images/standardbutton-delete-32.png</file>
<file>images/standardbutton-help-128.png</file>
<file>images/standardbutton-help-16.png</file>
<file>images/standardbutton-help-32.png</file>
<file>images/standardbutton-no-128.png</file>
<file>images/standardbutton-no-16.png</file>
<file>images/standardbutton-no-32.png</file>
<file>images/standardbutton-ok-128.png</file>
<file>images/standardbutton-ok-16.png</file>
<file>images/standardbutton-ok-32.png</file>
<file>images/standardbutton-open-128.png</file>
<file>images/standardbutton-open-16.png</file>
<file>images/standardbutton-open-32.png</file>
<file>images/standardbutton-save-128.png</file>
<file>images/standardbutton-save-16.png</file>
<file>images/standardbutton-save-32.png</file>
<file>images/standardbutton-yes-128.png</file>
<file>images/standardbutton-yes-16.png</file>
<file>images/standardbutton-yes-32.png</file>
<file>images/standardbutton-closetab-16.png</file>
<file>images/standardbutton-closetab-down-16.png</file>
<file>images/standardbutton-closetab-hover-16.png</file>
<file>images/refresh-24.png</file>
<file>images/refresh-32.png</file>
<file>images/stop-24.png</file>
<file>images/stop-32.png</file>
<file>images/media-stop-16.png</file>
<file>images/media-stop-32.png</file>
<file>images/media-play-16.png</file>
<file>images/media-play-32.png</file>
<file>images/media-pause-16.png</file>
<file>images/media-pause-32.png</file>
<file>images/media-seek-forward-16.png</file>
<file>images/media-seek-forward-32.png</file>
<file>images/media-seek-backward-16.png</file>
<file>images/media-seek-backward-32.png</file>
<file>images/media-skip-forward-16.png</file>
<file>images/media-skip-forward-32.png</file>
<file>images/media-skip-backward-16.png</file>
<file>images/media-skip-backward-32.png</file>
<file>images/media-volume-16.png</file>
<file>images/media-volume-muted-16.png</file>
<file>images/fusion_groupbox.png</file>
<file>images/fusion_arrow.png</file>
</qresource>
<qresource prefix="/qt-project.org/styles/macstyle">
<file>images/closedock-16.png</file>
<file>images/closedock-down-16.png</file>
<file>images/dockdock-16.png</file>
<file>images/dockdock-down-16.png</file>
</qresource>
</RCC>

View File

@ -72,6 +72,15 @@ public:
QStyle *proxyStyle;
};
inline QImage styleCacheImage(const QSize &size)
{
return QImage(size, QImage::Format_ARGB32_Premultiplied);
}
inline QPixmap styleCachePixmap(const QSize &size)
{
return QPixmap(size);
}
#define BEGIN_STYLE_PIXMAPCACHE(a) \
QRect rect = option->rect; \
@ -80,13 +89,14 @@ public:
QPainter *p = painter; \
QString unique = QStyleHelper::uniqueName((a), option, option->rect.size()); \
int txType = painter->deviceTransform().type() | painter->worldTransform().type(); \
bool doPixmapCache = txType <= QTransform::TxTranslate; \
bool doPixmapCache = (txType <= QTransform::TxTranslate) \
|| (painter->deviceTransform().type() == QTransform::TxScale); \
if (doPixmapCache && QPixmapCache::find(unique, internalPixmapCache)) { \
painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \
} else { \
if (doPixmapCache) { \
rect.setRect(0, 0, option->rect.width(), option->rect.height()); \
imageCache = QImage(option->rect.size(), QImage::Format_ARGB32_Premultiplied); \
imageCache = styleCacheImage(option->rect.size()); \
imageCache.fill(0); \
p = new QPainter(&imageCache); \
}

View File

@ -52,6 +52,9 @@
#ifndef QT_NO_STYLE_CLEANLOOKS
#include "qcleanlooksstyle.h"
#endif
#ifndef QT_NO_STYLE_FUSION
#include "qfusionstyle.h"
#endif
#ifndef QT_NO_STYLE_GTK
#include "qgtkstyle.h"
#endif
@ -146,6 +149,11 @@ QStyle *QStyleFactory::create(const QString& key)
ret = new QPlastiqueStyle;
else
#endif
#ifndef QT_NO_STYLE_FUSION
if (style == QLatin1String("fusion"))
ret = new QFusionStyle;
else
#endif
#ifndef QT_NO_STYLE_CLEANLOOKS
if (style == QLatin1String("cleanlooks"))
ret = new QCleanlooksStyle;
@ -222,6 +230,10 @@ QStringList QStyleFactory::keys()
if (!list.contains(QLatin1String("GTK+")))
list << QLatin1String("GTK+");
#endif
#ifndef QT_NO_STYLE_FUSION
if (!list.contains(QLatin1String("Fusion")))
list << QLatin1String("Fusion");
#endif
#ifndef QT_NO_STYLE_CLEANLOOKS
if (!list.contains(QLatin1String("Cleanlooks")))
list << QLatin1String("Cleanlooks");

View File

@ -129,6 +129,18 @@ contains( styles, cleanlooks ) {
DEFINES += QT_NO_STYLE_CLEANLOOKS
}
contains( styles, fusion ) {
HEADERS += styles/qfusionstyle.h
HEADERS += styles/qfusionstyle_p.h
SOURCES += styles/qfusionstyle.cpp
!contains( styles, windows ) {
styles += windows
DEFINES+= QT_STYLE_WINDOWS
}
} else {
DEFINES += QT_NO_STYLE_FUSION
}
contains( styles, windows ) {
HEADERS += styles/qwindowsstyle.h
SOURCES += styles/qwindowsstyle.cpp

View File

@ -309,6 +309,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "STYLE_WINDOWSVISTA" ] = "auto";
dictionary[ "STYLE_PLASTIQUE" ] = "yes";
dictionary[ "STYLE_CLEANLOOKS" ]= "yes";
dictionary[ "STYLE_FUSION" ] = "yes";
dictionary[ "STYLE_WINDOWSCE" ] = "no";
dictionary[ "STYLE_WINDOWSMOBILE" ] = "no";
dictionary[ "STYLE_GTK" ] = "no";
@ -648,6 +649,11 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-style-cleanlooks")
dictionary[ "STYLE_CLEANLOOKS" ] = "no";
else if (configCmdLine.at(i) == "-qt-style-fusion")
dictionary[ "STYLE_FUSION" ] = "yes";
else if (configCmdLine.at(i) == "-no-style-fusion")
dictionary[ "STYLE_FUSION" ] = "no";
// Work around compiler nesting limitation
else
continueElse[1] = true;
@ -1481,6 +1487,7 @@ void Configure::applySpecSpecifics()
dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
dictionary[ "STYLE_PLASTIQUE" ] = "no";
dictionary[ "STYLE_CLEANLOOKS" ] = "no";
dictionary[ "STYLE_FUSION" ] = "no";
dictionary[ "STYLE_WINDOWSCE" ] = "yes";
dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes";
dictionary[ "OPENGL" ] = "no";
@ -1792,6 +1799,7 @@ bool Configure::displayHelp()
desc("STYLE_WINDOWSVISTA", "auto", "", " windowsvista", ' ');
desc("STYLE_PLASTIQUE", "yes", "", " plastique", ' ');
desc("STYLE_CLEANLOOKS", "yes", "", " cleanlooks", ' ');
desc("STYLE_FUSION", "yes", "", " fusion", ' ');
desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' ');
desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile\n", ' ');
desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
@ -2373,6 +2381,9 @@ void Configure::generateOutputVars()
if (dictionary[ "STYLE_CLEANLOOKS" ] == "yes")
qmakeStyles += "cleanlooks";
if (dictionary[ "STYLE_FUSION" ] == "yes")
qmakeStyles += "fusion";
if (dictionary[ "STYLE_WINDOWSXP" ] == "yes")
qmakeStyles += "windowsxp";
@ -3153,6 +3164,7 @@ void Configure::generateConfigfiles()
if (dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS";
if (dictionary["STYLE_PLASTIQUE"] != "yes") qconfigList += "QT_NO_STYLE_PLASTIQUE";
if (dictionary["STYLE_CLEANLOOKS"] != "yes") qconfigList += "QT_NO_STYLE_CLEANLOOKS";
if (dictionary["STYLE_FUSION"] != "yes") qconfigList += "QT_NO_STYLE_FUSION";
if (dictionary["STYLE_WINDOWSXP"] != "yes" && dictionary["STYLE_WINDOWSVISTA"] != "yes")
qconfigList += "QT_NO_STYLE_WINDOWSXP";
if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA";
@ -3356,6 +3368,7 @@ void Configure::displayConfig()
sout << " Windows Vista..........." << dictionary[ "STYLE_WINDOWSVISTA" ] << endl;
sout << " Plastique..............." << dictionary[ "STYLE_PLASTIQUE" ] << endl;
sout << " Cleanlooks.............." << dictionary[ "STYLE_CLEANLOOKS" ] << endl;
sout << " Fusion.................." << dictionary[ "STYLE_FUSION" ] << endl;
sout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl;
sout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl;