summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-03-05 14:37:17 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 15:16:15 +0100
commit99b032e13203a22793431e61f38c73cbf02a66cb (patch)
tree8c6b9de206408891eb85a90640975245f02df721 /src
parent51216956b2b6b29cd77877c473c0d2b5707d3333 (diff)
Improve the look and feel of Mac extension arrow
This adds an improved extension arrow as well as a graphic for retina macs. Change-Id: Ie7395bbd87d6d354437bdbcc0cf258a27c09a360 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/images/toolbar-ext.pngbin0 -> 516 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext@2x.pngbin0 -> 505 bytes
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm6
-rw-r--r--src/widgets/styles/qmacstylepixmaps_mac_p.h72
-rw-r--r--src/widgets/styles/qstyle.qrc2
-rw-r--r--src/widgets/styles/styles.pri1
6 files changed, 6 insertions, 75 deletions
diff --git a/src/widgets/styles/images/toolbar-ext.png b/src/widgets/styles/images/toolbar-ext.png
new file mode 100644
index 0000000000..37bd403ff8
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext@2x.png b/src/widgets/styles/images/toolbar-ext@2x.png
new file mode 100644
index 0000000000..6fc729efb0
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext@2x.png
Binary files differ
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 203cf8c622..1eb78adeda 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -48,7 +48,6 @@
#include "qmacstyle_mac_p.h"
#include "qmacstyle_mac_p_p.h"
-#include "qmacstylepixmaps_mac_p.h"
#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN
//#define DEBUG_SIZE_CONSTRAINT
@@ -2375,6 +2374,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
case PM_MenuHMargin:
ret = 0;
break;
+ case PM_ToolBarExtensionExtent:
+ ret = 21;
+ break;
case PM_ToolBarFrameWidth:
ret = 1;
if (widget) {
@@ -6362,7 +6364,7 @@ QIcon QMacStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *o
return QCommonStyle::standardIcon(standardIcon, opt, widget);
case SP_ToolBarHorizontalExtensionButton:
case SP_ToolBarVerticalExtensionButton: {
- QPixmap pixmap(qt_mac_toolbar_ext);
+ QPixmap pixmap(QLatin1String(":/qt-project.org/styles/macstyle/images/toolbar-ext.png"));
if (standardIcon == SP_ToolBarVerticalExtensionButton) {
QPixmap pix2(pixmap.height(), pixmap.width());
pix2.fill(Qt::transparent);
diff --git a/src/widgets/styles/qmacstylepixmaps_mac_p.h b/src/widgets/styles/qmacstylepixmaps_mac_p.h
deleted file mode 100644
index f76383a2d4..0000000000
--- a/src/widgets/styles/qmacstylepixmaps_mac_p.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 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 QMACSTYLEPIXMAPS_MAC_P_H
-#define QMACSTYLEPIXMAPS_MAC_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.
-//
-
-static const char * const qt_mac_toolbar_ext[]={
- "14 9 4 1",
- "# c #858585",
- "b c #d9d9d9",
- ". c #dbdbdb",
- "a c None",
- ".###..###.aaaa",
- "a.###..###.aaa",
- "aab###bb###baa",
- "aaab###bb###ba",
- "aaaa.###..###.",
- "aaa.###..###.a",
- "aab###bb###baa",
- "ab###bb###baaa",
- ".###..###.aaaa"};
-
-#endif // QMACSTYLEPIXMAPS_MAC_P_H
diff --git a/src/widgets/styles/qstyle.qrc b/src/widgets/styles/qstyle.qrc
index d835728928..28ad484032 100644
--- a/src/widgets/styles/qstyle.qrc
+++ b/src/widgets/styles/qstyle.qrc
@@ -133,5 +133,7 @@
<file>images/closedock-down-16.png</file>
<file>images/dockdock-16.png</file>
<file>images/dockdock-down-16.png</file>
+ <file>images/toolbar-ext.png</file>
+ <file>images/toolbar-ext@2x.png</file>
</qresource>
</RCC>
diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri
index 109621988e..b39b17fd86 100644
--- a/src/widgets/styles/styles.pri
+++ b/src/widgets/styles/styles.pri
@@ -52,7 +52,6 @@ contains(QT_CONFIG, gtkstyle) {
contains( styles, mac ) {
HEADERS += \
styles/qmacstyle_mac_p.h \
- styles/qmacstylepixmaps_mac_p.h \
styles/qmacstyle_mac_p_p.h
OBJECTIVE_SOURCES += styles/qmacstyle_mac.mm