QTfrontend/teamselect.cpp
changeset 1647 ab0c8c4be7b3
parent 1475 bab5650fc894
child 2110 df2a1fe3617a
equal deleted inserted replaced
1646:19b3784ac9d2 1647:ab0c8c4be7b3
   200   }
   200   }
   201 
   201 
   202   emit setEnabledGameStart(curPlayingTeams.size()>1);
   202   emit setEnabledGameStart(curPlayingTeams.size()>1);
   203 }
   203 }
   204 
   204 
   205 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int maxHeight)
   205 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int fixedHeight)
   206 {
   206 {
   207 	VertScrArea* area = new VertScrArea(color);
   207 	VertScrArea* area = new VertScrArea(color);
   208 	area->setWidget(pfteams);
   208 	area->setWidget(pfteams);
   209 	mainLayout.addWidget(area, 30);
   209 	mainLayout.addWidget(area, 30);
   210 	if (maxHeight > 0)
   210 	if (fixedHeight > 0)
   211 	{
   211 	{
   212 		area->setMaximumHeight(maxHeight);
   212 		area->setMinimumHeight(fixedHeight);
       
   213 		area->setMaximumHeight(fixedHeight);
   213 		area->setStyleSheet(
   214 		area->setStyleSheet(
   214 				"FrameTeams{"
   215 				"FrameTeams{"
   215 					"border: solid;"
   216 					"border: solid;"
   216 					"border-width: 1px;"
   217 					"border-width: 1px;"
   217 					"border-radius: 16px;"
   218 					"border-radius: 16px;"
   228 	framePlaying = new FrameTeams();
   229 	framePlaying = new FrameTeams();
   229 	frameDontPlaying = new FrameTeams();
   230 	frameDontPlaying = new FrameTeams();
   230 	
   231 	
   231 	QPalette p;
   232 	QPalette p;
   232 	p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
   233 	p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
   233 	addScrArea(framePlaying, p.color(QPalette::Window).light(105), 200);
   234 	addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250);
   234 	addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
   235 	addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
   235 	QPushButton * btnSetup = new QPushButton(this);
   236 	QPushButton * btnSetup = new QPushButton(this);
   236 	btnSetup->setText(QPushButton::tr("Setup"));
   237 	btnSetup->setText(QPushButton::tr("Setup"));
   237 	connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
   238 	connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
   238 	mainLayout.addWidget(btnSetup);
   239 	mainLayout.addWidget(btnSetup);