Diffstat (limited to 'noncore/games/kpacman/kpacman.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kpacman/kpacman.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/noncore/games/kpacman/kpacman.cpp b/noncore/games/kpacman/kpacman.cpp index 7df6ef0..d9d2d69 100644 --- a/noncore/games/kpacman/kpacman.cpp +++ b/noncore/games/kpacman/kpacman.cpp @@ -27,11 +27,13 @@ Kpacman::Kpacman(QWidget *parent, const char *name) menu(); - view = new KpacmanWidget( this, QString(name)+"widget"); + m_view = new QWidget( this, "m_view" ); + m_view->setBackgroundColor( black ); + m_layout = new QGridLayout( m_view ); + m_layout->setMargin( 7 ); -#ifndef QWS - setFixedSize(view->width(), view->height()); -#else - setCaption( "Kpacman" ); -#endif + view = new KpacmanWidget( this, QString(name)+"widget"); + m_layout->addWidget( view, 0, 0 ); + + setCaption( "KPacman" ); view->referee->setFocus(); @@ -64,12 +66,5 @@ Kpacman::Kpacman(QWidget *parent, const char *name) toggleHideMouseCursor(); -#ifndef QWS - menuBar->show(); - view->show(); - setMenu(menuBar); - setView(view); -#else - setCentralWidget( view ); -#endif + setCentralWidget( m_view ); } |