Fix graphical glitches in detailsbutton.

* Fix graphical glitches when rendering the detailsbutton.
 * Add copyright headers while touching this file.

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2009-12-07 15:15:55 +01:00
parent 999cf225b0
commit 717e0d3956
2 changed files with 59 additions and 1 deletions

View File

@@ -1,3 +1,32 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "detailsbutton.h" #include "detailsbutton.h"
#include <QtGui/QPaintEvent> #include <QtGui/QPaintEvent>
@@ -53,7 +82,7 @@ QPixmap DetailsButton::cacheRendering(const QSize &size, bool checked)
p.setBrush(lg); p.setBrush(lg);
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.drawRect(0, 0, size.width() - 1, size.height() - 1); p.drawRect(0, 0, size.width(), size.height());
p.setPen(QPen(palette().color(QPalette::Mid))); p.setPen(QPen(palette().color(QPalette::Mid)));
p.drawLine(0, size.height() - 1, 0, 0); p.drawLine(0, size.height() - 1, 0, 0);

View File

@@ -1,3 +1,32 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef DETAILSBUTTON_H #ifndef DETAILSBUTTON_H
#define DETAILSBUTTON_H #define DETAILSBUTTON_H