summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman/kpacman.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/kpacman/kpacman.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/kpacman.cpp23
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
@@ -26,13 +26,15 @@ 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();
@@ -63,14 +65,7 @@ Kpacman::Kpacman(QWidget *parent, const char *name)
toggleFocusInContinue();
toggleHideMouseCursor();
-#ifndef QWS
- menuBar->show();
- view->show();
- setMenu(menuBar);
- setView(view);
-#else
- setCentralWidget( view );
-#endif
+ setCentralWidget( m_view );
}
Kpacman::~Kpacman()