From 717e0d39565a8df1fb6f04ce5eb262bf78716ce8 Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Mon, 7 Dec 2009 15:15:55 +0100 Subject: [PATCH] Fix graphical glitches in detailsbutton. * Fix graphical glitches when rendering the detailsbutton. * Add copyright headers while touching this file. Reviewed-by: dt --- src/libs/utils/detailsbutton.cpp | 31 ++++++++++++++++++++++++++++++- src/libs/utils/detailsbutton.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/detailsbutton.cpp b/src/libs/utils/detailsbutton.cpp index 0429d6511e9..ed6fd351c92 100644 --- a/src/libs/utils/detailsbutton.cpp +++ b/src/libs/utils/detailsbutton.cpp @@ -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 <QtGui/QPaintEvent> @@ -53,7 +82,7 @@ QPixmap DetailsButton::cacheRendering(const QSize &size, bool checked) p.setBrush(lg); 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.drawLine(0, size.height() - 1, 0, 0); diff --git a/src/libs/utils/detailsbutton.h b/src/libs/utils/detailsbutton.h index 54c354dd5c6..5495e045e29 100644 --- a/src/libs/utils/detailsbutton.h +++ b/src/libs/utils/detailsbutton.h @@ -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 #define DETAILSBUTTON_H -- GitLab