summaryrefslogtreecommitdiff
authorwaspe <waspe>2003-06-05 06:48:39 (UTC)
committer waspe <waspe>2003-06-05 06:48:39 (UTC)
commit2f3202871135e2efc67c0cdef9b93d4c4953f372 (patch) (side-by-side diff)
treea988198fdf08bd48d98a961a2194b59177af7013
parentb72cce3813dfb64fd6d1920961b236c8e27bd27b (diff)
downloadopie-2f3202871135e2efc67c0cdef9b93d4c4953f372.zip
opie-2f3202871135e2efc67c0cdef9b93d4c4953f372.tar.gz
opie-2f3202871135e2efc67c0cdef9b93d4c4953f372.tar.bz2
backround of canvas now in syscolor
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.cpp2
-rw-r--r--noncore/games/backgammon/backgammon.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index 06523f1..db1a058 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -122,32 +122,34 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
thememenu->insertItem(tr( "Default"),this,SLOT(themedefault()));
thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme()));
menuBar->insertItem(tr( "Theme" ),thememenu);
QPopupMenu* optionmenu=new QPopupMenu(this);
optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect()));
optionmenu->insertSeparator();
optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI()));
optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules()));
menuBar->insertItem(tr( "Options"),optionmenu);
QWidget* mainarea=new QWidget(this);
setCentralWidget(mainarea);
//the main area
QBoxLayout* layout=new QBoxLayout(mainarea,QBoxLayout::TopToBottom);
area=new QCanvas(235,235);
+ QColor bgColor=palette().color(QPalette::Normal,QColorGroup::Background);
+ area->setBackgroundColor(bgColor);
boardview=new BackGammonView(area,mainarea);
boardview->setMaximumHeight(240);
layout->addWidget(boardview);
connect(boardview,SIGNAL(mouse(int,int)),this,SLOT(mouse(int,int)));
//status bar
message=new QLabel("<b>Backgammon</b>",mainarea);
message->setAlignment(AlignHCenter);
layout->addWidget(message);
//the marker
marker_current=new QCanvasRectangle(area);
marker_current->setBrush(QColor(0,0,255));
marker_current->setSize(15,5);
marker_current->setZ(1);
for(a=0;a<4;a++)
diff --git a/noncore/games/backgammon/backgammon.h b/noncore/games/backgammon/backgammon.h
index e3276f1..d803489 100644
--- a/noncore/games/backgammon/backgammon.h
+++ b/noncore/games/backgammon/backgammon.h
@@ -5,33 +5,32 @@
#include "canvasimageitem.h"
//#include "rulesdialog.h"
#include "moveengine.h"
#include <qlabel.h>
#include <qmainwindow.h>
//#include <qwidget.h>
class BackGammon : public QMainWindow
{
Q_OBJECT
private:
- //GUI
//the "status" bar
QLabel* message;
//the main drawing area
QCanvas* area;
BackGammonView* boardview;
CanvasImageItem* board;
CanvasImageItem* table;
CanvasImageItem** p1;
CanvasImageItem** p2;
CanvasImageItem** p1_side;
CanvasImageItem** p2_side;
CanvasImageItem** diceA1;
CanvasImageItem** diceA2;
CanvasImageItem** diceB1;
CanvasImageItem** diceB2;