From: Manuel Nickschas Date: Wed, 11 Feb 2009 18:39:45 +0000 (+0100) Subject: Add new logo for the main page X-Git-Tag: 0.4.0~92 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=c8034446b66ab7964433235c51ce32bfc3c9d672 Add new logo for the main page Probably only temporary until Nuno Pinheiro is kind enough to do more gorgeous artwork, but better than the old thing. Also we now have smooth scaling if the logo doesn't fit in its original size... --- diff --git a/pics/pics.qrc b/pics/pics.qrc index b3aa5290..7ec82236 100644 --- a/pics/pics.qrc +++ b/pics/pics.qrc @@ -1,6 +1,6 @@ - quassel-large.png + quassel-logo.png qt-logo.png diff --git a/pics/quassel-large.png b/pics/quassel-large.png deleted file mode 100644 index 4b68972c..00000000 Binary files a/pics/quassel-large.png and /dev/null differ diff --git a/pics/quassel-logo.png b/pics/quassel-logo.png new file mode 100644 index 00000000..40c41f33 Binary files /dev/null and b/pics/quassel-logo.png differ diff --git a/pics/quassel-logo.svgz b/pics/quassel-logo.svgz new file mode 100644 index 00000000..a573c6cc Binary files /dev/null and b/pics/quassel-logo.svgz differ diff --git a/src/qtui/CMakeLists.txt b/src/qtui/CMakeLists.txt index ca17c3a5..492c50ad 100644 --- a/src/qtui/CMakeLists.txt +++ b/src/qtui/CMakeLists.txt @@ -31,6 +31,7 @@ set(SOURCES debugmessagemodelfilter.cpp inputwidget.cpp jumpkeyhandler.cpp + mainpage.cpp mainwin.cpp msgprocessorstatuswidget.cpp nicklistwidget.cpp @@ -73,6 +74,7 @@ set(MOC_HDRS debugmessagemodelfilter.h inputwidget.h jumpkeyhandler.h + mainpage.h mainwin.h msgprocessorstatuswidget.h nicklistwidget.h diff --git a/src/qtui/mainpage.cpp b/src/qtui/mainpage.cpp new file mode 100644 index 00000000..09392944 --- /dev/null +++ b/src/qtui/mainpage.cpp @@ -0,0 +1,45 @@ +/*************************************************************************** +* Copyright (C) 2005-09 by the Quassel Project * +* devel@quassel-irc.org * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) version 3. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +#include +#include + +#include "mainpage.h" + +MainPage::MainPage(QWidget *parent) : QWidget(parent) { + + +} + +void MainPage::paintEvent(QPaintEvent *event) { + Q_UNUSED(event); + + QPainter painter(this); + QImage img(":/pics/quassel-logo.png"); // FIXME load externally + + if(img.height() > height() || img.width() > width()) + img = img.scaled(width(), height(), Qt::KeepAspectRatio, Qt::SmoothTransformation); + + qreal xmargin = (width() - img.width()) / 2; + qreal ymargin = (height() - img.height()) / 2; + + painter.drawImage(xmargin, ymargin, img); + +} diff --git a/src/qtui/mainpage.h b/src/qtui/mainpage.h new file mode 100644 index 00000000..1d1e35d1 --- /dev/null +++ b/src/qtui/mainpage.h @@ -0,0 +1,38 @@ +/*************************************************************************** +* Copyright (C) 2005-09 by the Quassel Project * +* devel@quassel-irc.org * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) version 3. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +#ifndef MAINPAGE_H_ +#define MAINPAGE_H_ + +#include + +class MainPage : public QWidget { + Q_OBJECT + +public: + MainPage(QWidget *parent = 0); + +protected: + void paintEvent(QPaintEvent *event); + + +}; + +#endif diff --git a/src/qtui/ui/bufferwidget.ui b/src/qtui/ui/bufferwidget.ui index 93de974b..9cf26893 100644 --- a/src/qtui/ui/bufferwidget.ui +++ b/src/qtui/ui/bufferwidget.ui @@ -1,90 +1,52 @@ - + + BufferWidget - - + + 0 0 - 782 - 542 + 613 + 434 - - + + 5 0 - + 200 100 - + Qt::DefaultContextMenu - + - + - - - + + + 0 0 - + 0 - - - - 0 - - - - - QFrame::StyledPanel - - - QFrame::Plain - - - - - - - Trebuchet MS - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Trebuchet MS'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/pics/quassel-large.png" /><span style=" font-size:89pt; color:#00008b;">uassel IRC</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:49pt;"><span style=" font-size:22pt;">Chat comfortably. Anywhere.</span></p></body></html> - - - true - - - Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignTop|Qt::AlignVCenter|Qt::AlignVertical_Mask - - - - - - - + + - + @@ -92,12 +54,18 @@ p, li { white-space: pre-wrap; } ChatViewSearchBar QWidget -
chatviewsearchbar.h
+
chatviewsearchbar.h
+ 1 +
+ + MainPage + QWidget +
mainpage.h
1
- +