diff --git a/pokerth_game.pro b/pokerth_game.pro index e8b164de..294dce32 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -200,7 +200,6 @@ HEADERS += src/engine/game.h \ src/gui/generic/serverguiwrapper.h \ src/gui/qt/gametable/mychancelabel.h \ src/gui/qt/serverlistdialog/serverlistdialogimpl.h \ - src/gui/qt/gametable/mymenubar.h \ src/gui/qt/gametable/mytimeoutlabel.h \ src/gui/qt/gametable/mynamelabel.h \ src/gui/qt/settingsdialog/mystylelistitem.h \ @@ -277,7 +276,6 @@ SOURCES += src/pokerth.cpp \ src/core/common/loghelper_client.cpp \ src/gui/qt/gametable/mychancelabel.cpp \ src/gui/qt/serverlistdialog/serverlistdialogimpl.cpp \ - src/gui/qt/gametable/mymenubar.cpp \ src/gui/qt/gametable/mytimeoutlabel.cpp \ src/gui/qt/gametable/mynamelabel.cpp \ src/gui/qt/settingsdialog/mystylelistitem.cpp \ diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 2d0b8d99..0b9ab25e 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -563,16 +563,6 @@ void gameLobbyDialogImpl::updateGameItem(QList itemList, unsign PlayerIdList::const_iterator end = info.players.end(); while (i != end) { - //mark players as active - int it1 = 0; - while (myNickListModel->item(it1)) { - if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == *i) { - myNickListModel->item(it1, 0)->setData("active", 34); - break; - } - ++it1; - } - if(myPlayerId == *i) { itemList.at(0)->setData( "MeInThisGame", 16); itemList.at(0)->setBackground(QBrush(QColor(0, 255, 0, 127))); @@ -594,6 +584,22 @@ void gameLobbyDialogImpl::updateGameItem(QList itemList, unsign ++i; } + //reset players iterator + i = info.players.begin(); + end = info.players.end(); + while (i != end) { + //mark players as active + int it1 = 0; + while (myNickListModel->item(it1)) { + if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == *i) { + myNickListModel->item(it1, 0)->setData("active", 34); + break; + } + ++it1; + } + ++i; + } + QString playerStr; playerStr.sprintf("%u/%u", (unsigned)info.players.size(), (unsigned)info.data.maxNumberOfPlayers); itemList.at(1)->setData(playerStr, Qt::DisplayRole); diff --git a/src/gui/qt/gametable.ui b/src/gui/qt/gametable.ui index fe723a76..f76fcf38 100644 --- a/src/gui/qt/gametable.ui +++ b/src/gui/qt/gametable.ui @@ -4583,7 +4583,7 @@ p, li { white-space: pre-wrap; } - + 0 @@ -4786,11 +4786,6 @@ p, li { white-space: pre-wrap; } QPushButton
myactionbutton.h
- - MyMenuBar - QMenuBar -
mymenubar.h
-
MyTimeoutLabel QLabel diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 375cbe1f..464e7cf4 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -43,7 +43,6 @@ #include "mynamelabel.h" #include "mychancelabel.h" #include "mytimeoutlabel.h" -#include "mymenubar.h" #include "guilog.h" #include "chattools.h" diff --git a/src/gui/qt/gametable/mymenubar.cpp b/src/gui/qt/gametable/mymenubar.cpp deleted file mode 100644 index 9cf620c7..00000000 --- a/src/gui/qt/gametable/mymenubar.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************************** - * PokerTH - The open source texas holdem engine * - * Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU Affero General Public License as * - * published by the Free Software Foundation, either version 3 of the * - * License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Affero General Public License for more details. * - * * - * You should have received a copy of the GNU Affero General Public License * - * along with this program. If not, see . * - * * - * * - * Additional permission under GNU AGPL version 3 section 7 * - * * - * If you modify this program, or any covered work, by linking or * - * combining it with the OpenSSL project's OpenSSL library (or a * - * modified version of that library), containing parts covered by the * - * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH * - * (Felix Hammer, Florian Thauer, Lothar May) grant you additional * - * permission to convey the resulting work. * - * Corresponding Source for a non-source form of such a combination * - * shall include the source code for the parts of OpenSSL used as well * - * as that of the covered work. * - *****************************************************************************/ -#include "mymenubar.h" - -MyMenuBar::MyMenuBar(QMainWindow* parent) - : QMenuBar(parent) -{ -#if (QT_VERSION >= 0x040501) - this->setAttribute(Qt::WA_TranslucentBackground); - this->setStyleSheet("QMenuBar { border-width: 0px; border-style: none;} "); -#endif -} - -void MyMenuBar::paintEvent(QPaintEvent *e) -{ - - QMenuBar::paintEvent(e); -} diff --git a/src/gui/qt/gametable/mymenubar.h b/src/gui/qt/gametable/mymenubar.h deleted file mode 100644 index efe17037..00000000 --- a/src/gui/qt/gametable/mymenubar.h +++ /dev/null @@ -1,49 +0,0 @@ -/***************************************************************************** - * PokerTH - The open source texas holdem engine * - * Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU Affero General Public License as * - * published by the Free Software Foundation, either version 3 of the * - * License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Affero General Public License for more details. * - * * - * You should have received a copy of the GNU Affero General Public License * - * along with this program. If not, see . * - * * - * * - * Additional permission under GNU AGPL version 3 section 7 * - * * - * If you modify this program, or any covered work, by linking or * - * combining it with the OpenSSL project's OpenSSL library (or a * - * modified version of that library), containing parts covered by the * - * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH * - * (Felix Hammer, Florian Thauer, Lothar May) grant you additional * - * permission to convey the resulting work. * - * Corresponding Source for a non-source form of such a combination * - * shall include the source code for the parts of OpenSSL used as well * - * as that of the covered work. * - *****************************************************************************/ -#ifndef MYMENUBAR_H -#define MYMENUBAR_H - -#include -#include -#if QT_VERSION >= 0x050000 -#include -#endif - -class MyMenuBar : public QMenuBar -{ - Q_OBJECT -public: - MyMenuBar(QMainWindow*); - - void paintEvent(QPaintEvent * event); -}; - -#endif diff --git a/src/gui/qt/gui_800x480/gametable_800x480.ui b/src/gui/qt/gui_800x480/gametable_800x480.ui index ca512667..ba2eb0e9 100644 --- a/src/gui/qt/gui_800x480/gametable_800x480.ui +++ b/src/gui/qt/gui_800x480/gametable_800x480.ui @@ -54,7 +54,16 @@
- + + 0 + + + 0 + + + 0 + + 0 @@ -2749,7 +2758,16 @@ p, li { white-space: pre-wrap; } QGroupBox {border-style:none;} - + + 0 + + + 0 + + + 0 + + 0 @@ -4262,7 +4280,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -4621,13 +4648,13 @@ p, li { white-space: pre-wrap; }
- + 0 0 800 - 20 + 19 @@ -4781,11 +4808,6 @@ p, li { white-space: pre-wrap; } - - Slider - QSlider -
myslider.h
-
MySetLabel QLabel @@ -4811,11 +4833,6 @@ p, li { white-space: pre-wrap; } QPushButton
myactionbutton.h
- - MyMenuBar - QMenuBar -
mymenubar.h
-
MyTimeoutLabel QLabel @@ -4826,6 +4843,11 @@ p, li { white-space: pre-wrap; } QLabel
mynamelabel.h
+ + Slider + QSlider +
myslider.h
+
MyCashLabel QLabel diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp index 5cab9d2c..fc5c74e3 100644 --- a/src/gui/qt/styles/gametablestylereader.cpp +++ b/src/gui/qt/styles/gametablestylereader.cpp @@ -1409,6 +1409,7 @@ void GameTableStyleReader::setCardHolderStyle(QLabel *l, int bero) void GameTableStyleReader::setMenuBarStyle(QMenuBar *mb) { + mb->setAttribute(Qt::WA_TranslucentBackground); mb->setStyleSheet("QMenuBar { background-color: #"+MenuBgColor+"; font-size:12px; border-width: 0px;} QMenuBar::item { background: transparent; color: #"+MenuTextColor+"; } QMenuBar::item:selected { background: #"+MenuTextColor+"; color: #"+MenuBgColor+"; } QMenuBar::item:pressed { background: #"+MenuTextColor+"; color: #"+MenuBgColor+"; }"); }