Change logo to the v3, however still need improving

This commit is contained in:
jfmcarreira committed 2014-09-10 13:59:29 +01:00
1 parent 100b64931e
commit d7e593a989
2 files changed
+8 -6

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+8 -6
View File
@@ -119,24 +119,26 @@ private:
public:
PlaYUVerMdiArea( QWidget *parent = 0 ) :
QMdiArea( parent ),
m_pixmap( ":/images/playuver-backgroud-logo.png" )
m_pixmapLogo( ":/images/playuver-backgroud-logo.png" )
{
}
protected:
void paintEvent( QPaintEvent *event )
{
QMdiArea::paintEvent( event );
QPainter painter( viewport() );
QSize logoSize = 2 * size() / 3;
QPixmap pixFinalLogo = m_pixmapLogo.scaled(logoSize,Qt::KeepAspectRatio);
// Calculate the logo position - the bottom right corner of the mdi area.
int x = width() / 2 - m_pixmap.width() / 2;
int y = height() / 2 - m_pixmap.height() / 2;
painter.drawPixmap( x, y, m_pixmap );
int x = width() / 2 - pixFinalLogo.width() / 2;
int y = height() / 2 - pixFinalLogo.height() / 2;
painter.drawPixmap( x, y, pixFinalLogo );
}
private:
// Store the logo image.
QPixmap m_pixmap;
QPixmap m_pixmapLogo;
};
//QMdiArea *mdiArea;