author | drw <drw> | 2002-09-25 23:41:03 (UTC) |
---|---|---|
committer | drw <drw> | 2002-09-25 23:41:03 (UTC) |
commit | 8282f23516675d5df801c2e6f43725367fbb5e8d (patch) (unidiff) | |
tree | 75bbb50ebbcb67585033b1c36f313e2ba9433e19 /noncore/settings | |
parent | c73cc2b7f4417b7cb168b3d801b00f34f3c3b7eb (diff) | |
download | opie-8282f23516675d5df801c2e6f43725367fbb5e8d.zip opie-8282f23516675d5df801c2e6f43725367fbb5e8d.tar.gz opie-8282f23516675d5df801c2e6f43725367fbb5e8d.tar.bz2 |
Fix Tux logo
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 517029b..3a37086 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -73,27 +73,20 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
73 | palmtopLogo->setPixmap( logo1Pixmap ); | 73 | palmtopLogo->setPixmap( logo1Pixmap ); |
74 | palmtopLogo->setFixedSize( 60, 60 ); | 74 | palmtopLogo->setFixedSize( 60, 60 ); |
75 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 75 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |
76 | 76 | ||
77 | QLabel *palmtopVersion = new QLabel( this ); | 77 | QLabel *palmtopVersion = new QLabel( this ); |
78 | palmtopVersion->setText( palmtopVersionString ); | 78 | palmtopVersion->setText( palmtopVersionString ); |
79 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 79 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
80 | 80 | ||
81 | 81 | ||
82 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); | 82 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); |
83 | hb1->setSpacing( 2 ); | 83 | hb1->setSpacing( 2 ); |
84 | |||
85 | QLabel *linuxLogo = new QLabel( this ); | ||
86 | 84 | ||
87 | // Need to do this extra qpainter code with this image becuase for some | 85 | QLabel *linuxLogo = new QLabel( this ); |
88 | // reason it doesn't alpha belnd if directly converted to a pixmap | ||
89 | QPixmap logo2Pixmap( 60, 60 ); | ||
90 | QColor bgColor = colorGroup().background(); | ||
91 | QPainter painter( &logo2Pixmap ); | ||
92 | painter.fillRect( QRect( 0, 0, 60, 60 ), QBrush( bgColor ) ); | ||
93 | QImage logo2 = Resource::loadImage( "tux-logo" ); | 86 | QImage logo2 = Resource::loadImage( "tux-logo" ); |
94 | logo2 = logo2.smoothScale( 40, 47 ); | 87 | logo2 = logo2.smoothScale( 55, 60 ); |
95 | painter.drawImage( 0, 0, logo2 ); | 88 | QPixmap logo2Pixmap; |
96 | painter.end(); | 89 | logo2Pixmap.convertFromImage( logo2 ); |
97 | linuxLogo->setPixmap( logo2Pixmap ); | 90 | linuxLogo->setPixmap( logo2Pixmap ); |
98 | linuxLogo->setFixedSize( 60, 60 ); | 91 | linuxLogo->setFixedSize( 60, 60 ); |
99 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 92 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |