qslider (no allin possible) bugfix, fadeout android bugfix, gui tweaks
for android
This commit is contained in:
@@ -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<br><b>%1</b> seconds.").arg(6));
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:10px;'>"+string+"</span>");
|
||||
QString fontsize;
|
||||
#ifdef ANDROID
|
||||
fontsize="16px";
|
||||
#else
|
||||
fontsize="10px";
|
||||
#endif
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:"+fontsize+";'>"+string+"</span>");
|
||||
autoStartTimerCounter = 6;
|
||||
autoStartTimer->start(1000);
|
||||
|
||||
@@ -1723,7 +1733,13 @@ void gameLobbyDialogImpl::updateAutoStartTimer()
|
||||
--autoStartTimerCounter;
|
||||
if(autoStartTimerCounter) {
|
||||
QString string(tr("The game will start in<br><b>%1</b> seconds.").arg(autoStartTimerCounter));
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:10px;'>"+string+"</span>");
|
||||
QString fontsize;
|
||||
#ifdef ANDROID
|
||||
fontsize="16px";
|
||||
#else
|
||||
fontsize="10px";
|
||||
#endif
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:"+fontsize+";'>"+string+"</span>");
|
||||
} else {
|
||||
autoStartTimer->stop();
|
||||
autoStartTimerOverlay->hide();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -971,7 +971,14 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QObject {color:rgb(255, 255, 255); font: 14px}</string>
|
||||
<string notr="true">QObject {font: 14px}</string>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!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></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1024</width>
|
||||
<height>600</height>
|
||||
<width>800</width>
|
||||
<height>424</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@@ -4211,57 +4211,30 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>47</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_15">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="tabsButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth_android.qrc">
|
||||
<normaloff>:/gfx/preferences-desktop_50x50.png</normaloff>:/gfx/preferences-desktop_50x50.png</iconset>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton { border:none; background-image: url(":/gfx/tab-new-background.png"); background-repeat: no-repeat; background-position: center center;}</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
@@ -4273,9 +4246,12 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -4299,9 +4275,12 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<width>40</width>
|
||||
<height>57</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -4396,7 +4375,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth_android.qrc">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/view-fullscreen_50x50.png</normaloff>:/gfx/view-fullscreen_50x50.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -4495,7 +4474,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="Slider" name="horizontalSlider_bet">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<width>160</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -4563,7 +4542,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1024</width>
|
||||
<width>800</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -4631,7 +4610,7 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
<action name="actionFullScreen">
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth_android.qrc">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/view-fullscreen.png</normaloff>:/gfx/view-fullscreen.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -4689,7 +4668,7 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
<action name="actionConfigure_PokerTH">
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth_android.qrc">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/systemsettings.png</normaloff>:/gfx/systemsettings.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -4698,7 +4677,7 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
<action name="actionClose">
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth_android.qrc">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/application_exit.png</normaloff>:/gfx/application_exit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -4718,6 +4697,11 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Slider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header>myslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MySetLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
@@ -4758,11 +4742,6 @@ p, li { white-space: pre-wrap; }
|
||||
<extends>QLabel</extends>
|
||||
<header>mynamelabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Slider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header>myslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MyCashLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
@@ -4770,7 +4749,7 @@ p, li { white-space: pre-wrap; }
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../resources/pokerth_android.qrc"/>
|
||||
<include location="../resources/pokerth.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,7 +66,6 @@ void newGameDialogImpl::exec()
|
||||
myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("AfterMBStayAtLastBlind"));
|
||||
|
||||
QDialog::exec();
|
||||
|
||||
}
|
||||
|
||||
void newGameDialogImpl::callChangeBlindsDialog(bool show)
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
<file>document-revert.png</file>
|
||||
<file>view-fullscreen_50x50.png</file>
|
||||
<file>preferences-desktop_50x50.png</file>
|
||||
<file>tab-new-background.png</file>
|
||||
<file>tab-close.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/cflags">
|
||||
<file>cflags/ad.png</file>
|
||||
@@ -535,5 +537,6 @@
|
||||
<file>android-data/translations/pokerth_tr.qm</file>
|
||||
<file>android-data/translations/pokerth_zhcn.qm</file>
|
||||
<file>android-data/misc/agpl.html</file>
|
||||
<file>android-data/gfx/gui/table/default_800x480/android_tablestyle_800x480.xml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -87,6 +87,10 @@ public:
|
||||
QString getHandRanking() const {
|
||||
return HandRanking;
|
||||
}
|
||||
QString getTable() const {
|
||||
return Table;
|
||||
}
|
||||
|
||||
QString getActionPic(int);
|
||||
|
||||
QString getFKeyIndicatorColor() const {
|
||||
|
||||
Reference in New Issue
Block a user