diff options
author | deva <deva> | 2005-07-28 12:09:10 +0000 |
---|---|---|
committer | deva <deva> | 2005-07-28 12:09:10 +0000 |
commit | 6be08a50e748fbccd05a0194a65b2721b78c1b76 (patch) | |
tree | 01bbc99f0bc1108b11f49bfc32b1369a696e5be2 /src/aboutwindow.cc | |
parent | 1475da2d8d956998e5c210684a49d44df5a9a016 (diff) |
*** empty log message ***
Diffstat (limited to 'src/aboutwindow.cc')
-rw-r--r-- | src/aboutwindow.cc | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/src/aboutwindow.cc b/src/aboutwindow.cc index e5a487c..06ebb69 100644 --- a/src/aboutwindow.cc +++ b/src/aboutwindow.cc @@ -34,21 +34,22 @@ #include <config.h> //"miav-grab.h" - +#define MARGIN 12 AboutWindow::AboutWindow( QWidget* parent, const char* name ) : QDialog( parent, name ) { - resize(320,460); setModal(true); - pix_logo = new QPixmap(); - pix_logo->load( PIXMAP_LOGO ); + pix_about = new QPixmap(); + pix_about->load( PIXMAP_ABOUT ); + + resize(pix_about->width(), pix_about->height()); - setBackgroundColor(QColor(150,150,150)); + setBackgroundColor(QColor(200,200,200)); btn_ok = new QPushButton(this); btn_ok->setText("OK"); - btn_ok->move(200, 410); - btn_ok->resize( 95, 40 ); + btn_ok->resize( 140, 50 ); + btn_ok->move(pix_about->width() - btn_ok->width() - MARGIN, pix_about->height() - btn_ok->height() - MARGIN); btn_ok->setFont( QFont( "Arial", 12, QFont::Bold ) ); QObject::connect( btn_ok, SIGNAL(clicked()), this, SLOT(close()) ); @@ -60,24 +61,33 @@ AboutWindow::~AboutWindow() { } +void AboutWindow::mouseReleaseEvent(QMouseEvent *event) +{ + close(); +} + void AboutWindow::paintEvent( QPaintEvent *event ) { + int version_x = 58; + int version_y = 90; + if(!event) return; // Just to get rid og the compile warning! QPainter painter; painter.begin(this); - painter.drawPixmap(-200,-50, *pix_logo); + painter.drawPixmap(0,0, *pix_about); - painter.setBrush( Dense4Pattern ); - painter.drawRect(25,25,270,377); - painter.setBrush( SolidPattern ); painter.setFont( QFont( "Arial", 18, QFont::Bold ) ); painter.setPen( Qt::black ); - painter.drawText(58,58, "MIAV-Grab v" VERSION); + painter.drawText(version_x, version_y, "MIAV-Grab v" VERSION); painter.setPen( Qt::red ); - painter.drawText(60,60, "MIAV-Grab v" VERSION); + painter.drawText(version_x + 2, version_y + 2, "MIAV-Grab v" VERSION); + /* + painter.setBrush( Dense4Pattern ); + painter.drawRect(25,25,270,377); + painter.setPen( Qt::white ); painter.setFont( QFont( "Arial", 11, QFont::Bold ) ); painter.drawText(30,70, 270, 357, 0, ABOUT_INFO); @@ -85,7 +95,7 @@ void AboutWindow::paintEvent( QPaintEvent *event ) painter.setPen( Qt::white ); painter.setFont( QFont( "Arial", 8, QFont::Bold ) ); painter.drawText(30,165, 270, 357, 0, GPL_LICENSE); - + */ painter.end(); } |