From 99d546ce72f40e28b04f09201d92d58294401591 Mon Sep 17 00:00:00 2001 From: imm Date: Sat, 21 Sep 2002 12:24:59 +0000 Subject: center widget --- (limited to 'noncore/games/kpacman/kpacman.cpp') 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() -- cgit v0.9.0.2