diff --git a/pokerth_game.pro b/pokerth_game.pro index a9adf80b..c1bcb3df 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -67,7 +67,9 @@ INCLUDEPATH += . \ src/gui/qt/internetgamelogindialog \ src/gui/qt/mymessagedialog \ src/gui/qt/gamelobbydialog \ - src/gui/qt/timeoutmsgbox + src/gui/qt/timeoutmsgbox \ + src/gui/qt/mymessagebox + DEPENDPATH += . \ src \ src/config \ @@ -105,7 +107,8 @@ DEPENDPATH += . \ src/gui/qt/changecompleteblindsdialog \ src/gui/qt/mymessagedialog \ src/gui/qt/gamelobbydialog \ - src/gui/qt/timeoutmsgbox + src/gui/qt/timeoutmsgbox \ + src/gui/qt/mymessagebox # Input HEADERS += src/engine/game.h \ @@ -203,7 +206,8 @@ HEADERS += src/engine/game.h \ src/gui/qt/gamelobbydialog/mynicklistsortfilterproxymodel.h \ src/gui/qt/gametable/myslider.h \ src/gui/qt/gametable/mycashlabel.h \ - src/gui/qt/sound/soundevents.h + src/gui/qt/sound/soundevents.h \ + src/gui/qt/mymessagebox/mymessagebox.h !gui_800x480 { FORMS += src/gui/qt/gametable.ui \ @@ -278,7 +282,8 @@ SOURCES += src/pokerth.cpp \ src/gui/qt/gamelobbydialog/mynicklistsortfilterproxymodel.cpp \ src/net/common/servermanagerfactoryclient.cpp \ src/gui/qt/gametable/mycashlabel.cpp \ - src/gui/qt/sound/soundevents.cpp + src/gui/qt/sound/soundevents.cpp \ + src/gui/qt/mymessagebox/mymessagebox.cpp TRANSLATIONS = ts/pokerth_af.ts \ ts/pokerth_bg.ts \ ts/pokerth_zhcn.ts \ @@ -611,3 +616,5 @@ android{ INCLUDEPATH += src/third_party/sqlite3 } + + diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index c2b7c6f4..565784ea 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -46,7 +46,9 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c) //wait start game message waitStartGameMsgBox = new MyMessageBox(this); waitStartGameMsgBox->setText(tr("Starting game. Please wait ...")); - waitStartGameMsgBox->setWindowModality(Qt::NonModal); +#ifndef ANDROID + waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal); +#endif #ifdef __APPLE__ waitStartGameMsgBox->setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog); #endif @@ -55,7 +57,9 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c) //wait start game message for rejoin waitRejoinStartGameMsgBox = new MyMessageBox(this); waitRejoinStartGameMsgBox->setText(tr("Waiting for the start of the next hand to rejoin the game ...")); - waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal); +#ifndef ANDROID + waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal); +#endif #ifdef __APPLE__ waitRejoinStartGameMsgBox->setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog); #endif @@ -1712,7 +1716,13 @@ void gameLobbyDialogImpl::showAutoStartTimer() autoStartTimerOverlay->setGeometry(((scrollArea_gameInfos->geometry().width()-190)/2), ((scrollArea_gameInfos->geometry().height()-50)/2), 190, 50); QString string(tr("The game will start in
%1 seconds.").arg(6)); - autoStartTimerOverlay->setText(""+string+""); + QString fontsize; +#ifdef ANDROID + fontsize="16px"; +#else + fontsize="10px"; +#endif + autoStartTimerOverlay->setText(""+string+""); autoStartTimerCounter = 6; autoStartTimer->start(1000); @@ -1723,7 +1733,13 @@ void gameLobbyDialogImpl::updateAutoStartTimer() --autoStartTimerCounter; if(autoStartTimerCounter) { QString string(tr("The game will start in
%1 seconds.").arg(autoStartTimerCounter)); - autoStartTimerOverlay->setText(""+string+""); + QString fontsize; +#ifdef ANDROID + fontsize="16px"; +#else + fontsize="10px"; +#endif + autoStartTimerOverlay->setText(""+string+""); } else { autoStartTimer->stop(); autoStartTimerOverlay->hide(); diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 8262b5f1..e9bd6d12 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -94,7 +94,11 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent) //set myStyle to widgets wich needs it #ifdef GUI_800x480 tabsDiag = new QDialog(this); - tabs.setupUi(tabsDiag); + tabs.setupUi(tabsDiag); +#ifdef ANDROID + tabsDiag->setStyleSheet("QDialog { font: 26px; background-image: url(\""+myGameTableStyle->getTable()+"\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}"); + tabs.frame->setStyleSheet("QObject { background-color: rgba(0, 0, 0, 100); }"); +#endif tabs.label_chance->setMyStyle(myGameTableStyle); #else label_chance->setMyStyle(myGameTableStyle); @@ -479,15 +483,12 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent) // Dialogs #ifdef GUI_800x480 myChat = new ChatTools(tabs.lineEdit_ChatInput, myConfig, INGAME_CHAT, tabs.textBrowser_Chat); + myChat->setMyStyle(myGameTableStyle); + tabs.lineEdit_ChatInput->installEventFilter(this); #else myChat = new ChatTools(lineEdit_ChatInput, myConfig, INGAME_CHAT, textBrowser_Chat); -#endif - myChat->setMyStyle(myGameTableStyle); - -#ifdef GUI_800x480 - tabs.lineEdit_ChatInput->installEventFilter(this); -#else - lineEdit_ChatInput->installEventFilter(this); + myChat->setMyStyle(myGameTableStyle); + lineEdit_ChatInput->installEventFilter(this); #endif this->installEventFilter(this); @@ -507,8 +508,8 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent) //hide left and right icon and menubar from maemo gui for ANDROID #ifdef ANDROID fullscreenButton->hide(); - tabsButton->hide(); - menubar->hide(); + menubar->hide(); +// tabsButton->hide(); #endif //Connects @@ -3728,53 +3729,61 @@ void gameTableImpl::closeGameTable() void gameTableImpl::changeSpinBoxBetValue(int value) { + if(betSliderChangedByInput) { + //prevent interval cutting of spinBox_betValue input from code below + betSliderChangedByInput = FALSE; + } + else { - if(betSliderChangedByInput) { - //prevent interval cutting of spinBox_betValue input from code below - betSliderChangedByInput = FALSE; - } else { - int temp; - if(horizontalSlider_bet->maximum() <= 1000 ) { - temp = (int)((value/10)*10); - } else if(horizontalSlider_bet->maximum() > 1000 && horizontalSlider_bet->maximum() <= 10000) { - temp = (int)((value/50)*50); - } else if(horizontalSlider_bet->maximum() > 10000 && horizontalSlider_bet->maximum() <= 100000) { - temp = (int)((value/500)*500); - } else { - temp = (int)((value/5000)*5000); - } + if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) { - if(temp < horizontalSlider_bet->minimum()) - spinBox_betValue->setValue(horizontalSlider_bet->minimum()); - else - spinBox_betValue->setValue(temp); - } + spinBox_betValue->setValue(horizontalSlider_bet->value()); + } + else { + + int temp; + if(horizontalSlider_bet->maximum() <= 1000 ) { + temp = (int)((value/10)*10); + } else if(horizontalSlider_bet->maximum() > 1000 && horizontalSlider_bet->maximum() <= 10000) { + temp = (int)((value/50)*50); + } else if(horizontalSlider_bet->maximum() > 10000 && horizontalSlider_bet->maximum() <= 100000) { + temp = (int)((value/500)*500); + } else { + temp = (int)((value/5000)*5000); + } + + if(temp < horizontalSlider_bet->minimum()) + spinBox_betValue->setValue(horizontalSlider_bet->minimum()); + else + spinBox_betValue->setValue(temp); + } + } } void gameTableImpl::spinBoxBetValueChanged(int value) { - if(horizontalSlider_bet->isEnabled()) { + if(horizontalSlider_bet->isEnabled()) { - QString betRaise = pushButton_BetRaise->text().section("\n",0 ,0); + QString betRaise = pushButton_BetRaise->text().section("\n",0 ,0); - if(value >= horizontalSlider_bet->minimum()) { + if(value >= horizontalSlider_bet->minimum()) { - if(value > horizontalSlider_bet->maximum()) { // print the maximum - pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->maximum())); - betSliderChangedByInput = TRUE; - horizontalSlider_bet->setValue(horizontalSlider_bet->maximum()); - } else { // really print the value - pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(value)); - betSliderChangedByInput = TRUE; - horizontalSlider_bet->setValue(value); - } - } else { // print the minimum - pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->minimum())); - betSliderChangedByInput = TRUE; - horizontalSlider_bet->setValue(horizontalSlider_bet->minimum()); - } - } + if(value > horizontalSlider_bet->maximum()) { // print the maximum + pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->maximum())); + betSliderChangedByInput = TRUE; + horizontalSlider_bet->setValue(horizontalSlider_bet->maximum()); + } else { // really print the value + pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(value)); + betSliderChangedByInput = TRUE; + horizontalSlider_bet->setValue(value); + } + } else { // print the minimum + pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->minimum())); + betSliderChangedByInput = TRUE; + horizontalSlider_bet->setValue(horizontalSlider_bet->minimum()); + } + } } void gameTableImpl::leaveCurrentNetworkGame() @@ -4018,7 +4027,9 @@ void gameTableImpl::refreshGameTableStyle() { myGameTableStyle->setWindowsGeometry(this); #ifdef GUI_800x480 -// myGameTableStyle->setChatLogStyle(textBrowser_Log); +#ifdef ANDROID + myGameTableStyle->setChatLogStyle(tabs.textBrowser_Log); +#endif myGameTableStyle->setChatLogStyle(tabs.textBrowser_Chat); myGameTableStyle->setChatLogStyle(tabs.textEdit_tipInput); myGameTableStyle->setChatInputStyle(tabs.lineEdit_ChatInput); @@ -4351,6 +4362,7 @@ void gameTableImpl::enableCallCheckPushButton() void gameTableImpl::tabsButtonClicked() { tabsDiag->setParent(this, Qt::Dialog); + tabsDiag->showFullScreen(); tabsDiag->show(); tabsDiag->raise(); tabsDiag->activateWindow(); diff --git a/src/gui/qt/gametable/mycardspixmaplabel.cpp b/src/gui/qt/gametable/mycardspixmaplabel.cpp index a80b94e2..87bb65b1 100755 --- a/src/gui/qt/gametable/mycardspixmaplabel.cpp +++ b/src/gui/qt/gametable/mycardspixmaplabel.cpp @@ -260,3 +260,12 @@ void MyCardsPixmapLabel::mouseReleaseEvent(QMouseEvent * event) QLabel::mouseReleaseEvent(event); } + +void MyCardsPixmapLabel::setFront ( const QPixmap& theValue ) +{ +#ifdef GUI_800x480 + front = theValue.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);; +#else + front = theValue; +#endif +} diff --git a/src/gui/qt/gametable/mycardspixmaplabel.h b/src/gui/qt/gametable/mycardspixmaplabel.h index 9011b36c..1b9396ff 100755 --- a/src/gui/qt/gametable/mycardspixmaplabel.h +++ b/src/gui/qt/gametable/mycardspixmaplabel.h @@ -81,9 +81,7 @@ public slots: void mousePressEvent ( QMouseEvent *); void mouseReleaseEvent ( QMouseEvent *); - void setFront ( const QPixmap& theValue ) { - front = theValue; - } + void setFront ( const QPixmap& theValue ); private: diff --git a/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui b/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui index 774d0d07..0cbc2813 100644 --- a/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui +++ b/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui @@ -971,7 +971,14 @@ - QObject {color:rgb(255, 255, 255); font: 14px} + QObject {font: 14px} + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Nimbus Sans L'; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> diff --git a/src/gui/qt/gui_800x480/gametable_800x480.ui b/src/gui/qt/gui_800x480/gametable_800x480.ui index 898f1604..20c1561d 100644 --- a/src/gui/qt/gui_800x480/gametable_800x480.ui +++ b/src/gui/qt/gui_800x480/gametable_800x480.ui @@ -6,8 +6,8 @@ 0 0 - 1024 - 600 + 800 + 424 @@ -4211,57 +4211,30 @@ p, li { white-space: pre-wrap; } 0 - - - - Qt::Vertical - - - - 47 - 13 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - 50 - 50 + 60 + 60 - 50 - 50 + 60 + 60 - - + + Qt::NoFocus - - - :/gfx/preferences-desktop_50x50.png:/gfx/preferences-desktop_50x50.png + + QPushButton { border:none; background-image: url(":/gfx/tab-new-background.png"); background-repeat: no-repeat; background-position: center center;} - 50 - 50 + 48 + 48 @@ -4273,9 +4246,12 @@ p, li { white-space: pre-wrap; } Qt::Horizontal + + QSizePolicy::Fixed + - 40 + 20 20 @@ -4299,9 +4275,12 @@ p, li { white-space: pre-wrap; } Qt::Horizontal + + QSizePolicy::Fixed + - 22 + 40 57 @@ -4396,7 +4375,7 @@ p, li { white-space: pre-wrap; } - + :/gfx/view-fullscreen_50x50.png:/gfx/view-fullscreen_50x50.png @@ -4495,7 +4474,7 @@ p, li { white-space: pre-wrap; } - 220 + 160 60 @@ -4563,7 +4542,7 @@ p, li { white-space: pre-wrap; } 0 0 - 1024 + 800 26 @@ -4631,7 +4610,7 @@ p, li { white-space: pre-wrap; } - + :/gfx/view-fullscreen.png:/gfx/view-fullscreen.png @@ -4689,7 +4668,7 @@ p, li { white-space: pre-wrap; } - + :/gfx/systemsettings.png:/gfx/systemsettings.png @@ -4698,7 +4677,7 @@ p, li { white-space: pre-wrap; } - + :/gfx/application_exit.png:/gfx/application_exit.png @@ -4718,6 +4697,11 @@ p, li { white-space: pre-wrap; } + + Slider + QSlider +
myslider.h
+
MySetLabel QLabel @@ -4758,11 +4742,6 @@ p, li { white-space: pre-wrap; } QLabel
mynamelabel.h
- - Slider - QSlider -
myslider.h
-
MyCashLabel QLabel @@ -4770,7 +4749,7 @@ p, li { white-space: pre-wrap; }
- + diff --git a/src/gui/qt/gui_800x480/tabs_800x480.ui b/src/gui/qt/gui_800x480/tabs_800x480.ui index daacad6e..b6c47c35 100644 --- a/src/gui/qt/gui_800x480/tabs_800x480.ui +++ b/src/gui/qt/gui_800x480/tabs_800x480.ui @@ -25,690 +25,778 @@ Start Local Game - - QObject {font: 26px} + + true 0 - 0 + 10 0 - 15 + 0 0 - - - 0 + + + false - - - - 0 - - - 0 - - - - - - 390 - 350 - - - - - 390 - 350 - - - - - 4 + + QFrame::NoFrame + + + QFrame::Plain + + + + 0 + + + 0 + + + + + 0 + + + + + 0 - - - - Qt::NoFocus + + 0 + + + + + + 390 + 350 + - - 0 + + + 390 + 350 + - - - Hands - - - - 0 - - - 0 - - - - - Qt::AlignCenter - + + true + + + + 4 + + + + + Qt::NoFocus + + + 0 + + + + Hands + + + + 0 + + + 0 + + + + + Qt::AlignCenter + + + + - - - - - - Chat - - - - 0 - - - 0 - - - - - Qt::NoFocus - - - true - - - Qt::ScrollBarAlwaysOff - - - true - + + + Chat + + + + 0 + + + 0 + + + + + Qt::NoFocus + + + true + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + - - - - - - - - - Kick - - - - 0 - - - 6 - - - 5 - - - - - 0 - - - - - 5 - - - - - Vote started by: - - - - - - - - 0 - 0 - - - - - - - - - - - - - 5 - - - - - Vote Timeout: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - - 0 - 0 - - - - - + + + Kick + + + + 0 + + + 6 + + + 5 + + + + + 0 + + + + + 5 + + + + + Vote started by: + + + + + + + + 0 + 0 + + + + + + + + + + + + + 5 + + + + + Vote Timeout: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + 80 + 20 + + + + Yes + + + + + + + + 80 + 20 + + + + No + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 27 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - - - - - - 80 - 20 - - - - Yes - - - - - - - - 80 - 20 - - - - No - - - - - - - - - - + + + Player info + + + + 3 + + + 6 + + + + + Qt::ClickFocus + + + + + + + Qt::NoFocus + + + Save + + + + - - - - - Qt::Vertical - - - - 20 - 27 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Player info - - - - 3 - - - 6 - - - - - Qt::ClickFocus - + + + + + + + + + + 390 + 350 + + + + + 390 + 350 + + + + true + + + + 1 + + + 2 + + + 4 + + + + + Qt::NoFocus + + + 0 + + + + Log + + + + 0 + + + 0 + + + + + Qt::NoFocus + + + true + + + Qt::ScrollBarAlwaysOff + + + + - - - - - Qt::NoFocus - - - Save - + + + Away + + + + + + Qt::NoFocus + + + Manual Action (default) + + + true + + + + + + + Qt::NoFocus + + + Auto-Check / Auto-Fold + + + + + + + Qt::NoFocus + + + Auto-Check / Auto-Call-Any + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - + + + Chance + + + + 1 + + + 0 + + + 1 + + + 1 + + + 0 + + + + + + + + + + + + + - - - - - - - 390 - 350 - - - - - 390 - 350 - - - - - 1 + + + + + Qt::Vertical - - 2 + + + 20 + 40 + + + + + + + + 6 - 4 + 0 - - + + + + + 60 + 60 + + + + + 60 + 60 + + Qt::NoFocus - - 0 + + QPushButton { border:none; background-image: url(":/gfx/tab-close.png"); background-repeat: no-repeat; background-position: center center;} - - - Log - - - - 0 - - - 0 - - - - - Qt::NoFocus - - - true - - - Qt::ScrollBarAlwaysOff - - - - - - - - Away - - - - - - Qt::NoFocus - - - Manual Action (default) - - - true - - - - - - - Qt::NoFocus - - - Auto-Check / Auto-Fold - - - - - - - Qt::NoFocus - - - Auto-Check / Auto-Call-Any - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Chance - - - - 1 - - - 0 - - - 1 - - - 1 - - - 0 - - - - - - - - - - + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 60 + 20 + + + + + + + + + 0 + 50 + + + + Speed: + + + + + + + + 18 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 50 + false + false + + + + + + + + + + + + 0 + 0 + + + + + 0 + 50 + + + + Qt::NoFocus + + + 1 + + + 11 + + + 1 + + + Qt::Horizontal + + + + + + + true + + + + 40 + 50 + + + + Qt::NoFocus + + + Shortcut: <Shift> + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 6 - - - 0 - - - - - Speed: - - - - - - - - 18 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - -1 - 50 - false - false - - - - - - - - - - - - - - - 0 - 0 - - - - - 0 - 45 - - - - Qt::NoFocus - - - 1 - - - 11 - - - 1 - - - Qt::Horizontal - - - - - - - true - - - - 40 - 20 - - - - Qt::NoFocus - - - Shortcut: <Shift> - - - - - - + + + + + + + Slider + QSlider +
myslider.h
+
MyLeftTabWidget QTabWidget @@ -726,11 +814,6 @@ QLabel
mychancelabel.h
- - Slider - QSlider -
myslider.h
-
@@ -741,12 +824,28 @@ setNum(int) - 403 - 409 + 515 + 406 - 79 - 409 + 105 + 406 + + + + + pushButton + clicked() + tabs + accept() + + + 721 + 395 + + + 661 + 402 diff --git a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp index 479cd5f4..1dcc4477 100755 --- a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp +++ b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp @@ -66,7 +66,6 @@ void newGameDialogImpl::exec() myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("AfterMBStayAtLastBlind")); QDialog::exec(); - } void newGameDialogImpl::callChangeBlindsDialog(bool show) diff --git a/src/gui/qt/resources/pokerth_android.qrc b/src/gui/qt/resources/pokerth_android.qrc index 0f7aefe1..e9681b95 100644 --- a/src/gui/qt/resources/pokerth_android.qrc +++ b/src/gui/qt/resources/pokerth_android.qrc @@ -56,6 +56,8 @@ document-revert.png view-fullscreen_50x50.png preferences-desktop_50x50.png + tab-new-background.png + tab-close.png cflags/ad.png @@ -535,5 +537,6 @@ android-data/translations/pokerth_tr.qm android-data/translations/pokerth_zhcn.qm android-data/misc/agpl.html + android-data/gfx/gui/table/default_800x480/android_tablestyle_800x480.xml diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index 0284f6bc..786a1302 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -276,16 +276,21 @@ void settingsDialogImpl::prepareDialog() #ifdef GUI_800x480 // define PokerTH default GameTableStyle for Maemo treeWidget_gameTableStyles->clear(); - + QString filename; +#ifdef MAEMO + filename = "defaulttablestyle_800x480.xml"; +#elif ANDROID + filename = "android_tablestyle_800x480.xml"; +#endif GameTableStyleReader defaultTableStyle(myConfig, this); - defaultTableStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml"); + defaultTableStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename); if(defaultTableStyle.getLoadedSuccessfull()) { QStringList tempStringList1; tempStringList1 << defaultTableStyle.getStyleDescription() << defaultTableStyle.getStyleMaintainerName(); MyStyleListItem *defaultTableItem = new MyStyleListItem(tempStringList1, treeWidget_gameTableStyles); - defaultTableItem->setData(0, 15, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml"); + defaultTableItem->setData(0, 15, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename); defaultTableItem->setData(0, 16, POKERTH_DISTRIBUTED_STYLE); - defaultTableItem->setData(0, Qt::ToolTipRole, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml"); + defaultTableItem->setData(0, Qt::ToolTipRole, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename); defaultTableItem->setData(2, Qt::ToolTipRole, defaultTableStyle.getMyStateToolTipInfo()); if(defaultTableStyle.getState()) defaultTableItem->setIcon(2, QIcon(":/gfx/emblem-important.png")); else defaultTableItem->setIcon(2, QIcon(":/gfx/dialog_ok_apply.png")); diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp index 37f2390e..f4c1d782 100644 --- a/src/gui/qt/styles/gametablestylereader.cpp +++ b/src/gui/qt/styles/gametablestylereader.cpp @@ -72,8 +72,8 @@ GameTableStyleReader::~GameTableStyleReader() void GameTableStyleReader::readStyleFile(QString file) { #ifdef ANDROID -//on Android we use just the defaul style packed with the binary via qrc - currentFileName = ":/android/android-data/gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml"; +//on Android we currently just use the defaul style packed with the binary via qrc + currentFileName = ":/android/android-data/gfx/gui/table/default_800x480/android_tablestyle_800x480.xml"; currentDir = ":/android/android-data/gfx/gui/table/default_800x480/"; #else //if style file failed --> default style fallback @@ -1545,7 +1545,9 @@ void GameTableStyleReader::setShowMyCardsButtonStyle( MyActionButton *sc) void GameTableStyleReader::setToolBoxBackground(QGroupBox* gb) { +#ifndef ANDROID gb->setStyleSheet("QGroupBox { border:none; background-image: url(\""+ToolBoxBackground+"\") }"); +#endif } void GameTableStyleReader::setTabWidgetStyle(QTabWidget *tw, QTabBar *tb) @@ -1558,8 +1560,13 @@ void GameTableStyleReader::setTabWidgetStyle(QTabWidget *tw, QTabBar *tb) bottomPadding = " padding-bottom: 3px;"; #endif -#ifndef GUI_800x480 - tb->setStyleSheet("QTabBar::tab{ "+ font1String +" font-size: 11px; color: #"+TabWidgetTextColor+"; background-color: #"+TabWidgetBgColor+"; border: 2px solid #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBorderColor+"; border-top-left-radius: 4px; border-top-right-radius: 4px; padding-top: "+tabBarPaddingTop+"px;"+bottomPadding+" padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { border-color: #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:only-one { margin: 0; } "); + QString tabTextFontSize; +#ifndef ANDROID + tabTextFontSize = "font-size: 11px; "; +#endif + +#ifndef MAEMO + tb->setStyleSheet("QTabBar::tab{ "+ font1String + tabTextFontSize +" color: #"+TabWidgetTextColor+"; background-color: #"+TabWidgetBgColor+"; border: 2px solid #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBorderColor+"; border-top-left-radius: 4px; border-top-right-radius: 4px; padding-top: "+tabBarPaddingTop+"px;"+bottomPadding+" padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { border-color: #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:only-one { margin: 0; } "); #endif } diff --git a/src/gui/qt/styles/gametablestylereader.h b/src/gui/qt/styles/gametablestylereader.h index ec833e3a..2c81b84f 100644 --- a/src/gui/qt/styles/gametablestylereader.h +++ b/src/gui/qt/styles/gametablestylereader.h @@ -87,6 +87,10 @@ public: QString getHandRanking() const { return HandRanking; } + QString getTable() const { + return Table; + } + QString getActionPic(int); QString getFKeyIndicatorColor() const { diff --git a/src/pokerth.cpp b/src/pokerth.cpp index 0add355e..5fa8c3f3 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -88,10 +88,10 @@ int main( int argc, char **argv ) //create defaultconfig ConfigFile *myConfig = new ConfigFile(argv[0], false); Log *myLog = new Log(myConfig); -//#ifndef ANDROID - // set PlastiqueStyle even for mac-version to prevent artefacts on styled widgets - a.setStyle(new QPlastiqueStyle); -//#endif + + // set PlastiqueStyle even for mac-version to prevent artefacts on styled widgets + a.setStyle(new QPlastiqueStyle); + QString myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); //set QApplication default font