QTfrontend/ui/widget/teamselect.cpp
changeset 12303 91ebbadc461d
parent 12222 a6cd48b8ef61
child 12693 e095ed002652
equal deleted inserted replaced
12302:071a05275798 12303:91ebbadc461d
   227     repaint();
   227     repaint();
   228 
   228 
   229     emit setEnabledGameStart(curPlayingTeams.size()>1);
   229     emit setEnabledGameStart(curPlayingTeams.size()>1);
   230 }
   230 }
   231 
   231 
   232 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int fixedHeight)
   232 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int minHeight, int maxHeight, bool setFrame)
   233 {
   233 {
   234     VertScrArea* area = new VertScrArea(color);
   234     VertScrArea* area = new VertScrArea(color);
   235     area->setWidget(pfteams);
   235     area->setWidget(pfteams);
   236     mainLayout.addWidget(area, 30);
   236     mainLayout.addWidget(area);
   237     if (fixedHeight > 0)
   237     if (minHeight > 0)
   238     {
   238         area->setMinimumHeight(minHeight);
   239         area->setMinimumHeight(fixedHeight);
   239     if (maxHeight > 0)
   240         area->setMaximumHeight(fixedHeight);
   240         area->setMaximumHeight(maxHeight);
       
   241     if (setFrame)
       
   242     {
   241         area->setStyleSheet(
   243         area->setStyleSheet(
   242             "FrameTeams{"
   244             "FrameTeams{"
   243             "border: solid;"
   245             "border: solid;"
   244             "border-width: 1px;"
   246             "border-width: 1px;"
   245             "border-radius: 16px;"
   247             "border-radius: 16px;"
   261     numTeamNotice->setWordWrap(true);
   263     numTeamNotice->setWordWrap(true);
   262     mainLayout.addWidget(numTeamNotice);
   264     mainLayout.addWidget(numTeamNotice);
   263 
   265 
   264     QPalette p;
   266     QPalette p;
   265     p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
   267     p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
   266     addScrArea(framePlaying, p.color(QPalette::Window).light(105), 150);
   268     addScrArea(framePlaying, p.color(QPalette::Window).light(105), 161, 325, true);
   267     addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
   269     addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 80, 0, false);
   268 
   270 
   269     this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
   271     this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
   270     this->setMinimumWidth(200);
   272     this->setMinimumWidth(200);
   271 }
   273 }
   272 
   274