refactoring gametable font sizes for each OS section
This commit is contained in:
@@ -35,23 +35,52 @@ GameTableStyleReader::GameTableStyleReader(ConfigFile *c, QWidget *w)
|
||||
bigBoardFontSize = "18";
|
||||
humanPlayerButtonFontSize = "13";
|
||||
betValueFontSize = "11";
|
||||
|
||||
tabBarPaddingTop = "2";
|
||||
tabBarPaddingSide = "10";
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
#elif __APPLE__
|
||||
font1String = "font-family: \"Lucida Grande\";";
|
||||
font2String = "font-family: \"Lucida Grande\";";
|
||||
|
||||
tabBarPaddingTop = "1";
|
||||
tabBarPaddingSide = "9";
|
||||
#else
|
||||
textBrowserFontsize= "10";
|
||||
cashFontSize = "10";
|
||||
setLabelFontSize = "10";
|
||||
playerNameLabelFontSize = "11";
|
||||
smallBoardFontSize = "13";
|
||||
bigBoardFontSize = "17";
|
||||
humanPlayerButtonFontSize = "12";
|
||||
betValueFontSize = "10";
|
||||
#elif MAEMO
|
||||
font1String = "font-family: \"Nimbus Sans L\";";
|
||||
font2String = "font-family: \"DejaVu Sans\";";
|
||||
tabBarPaddingTop = "0";
|
||||
tabBarPaddingSide = "9";
|
||||
textBrowserFontsize= "10";
|
||||
cashFontSize = "10";
|
||||
setLabelFontSize = "10";
|
||||
playerNameLabelFontSize = "11";
|
||||
smallBoardFontSize = "13";
|
||||
bigBoardFontSize = "17";
|
||||
humanPlayerButtonFontSize = "12";
|
||||
betValueFontSize = "10";
|
||||
#elif ANDROID
|
||||
font1String = "font-family: \"Nimbus Sans L\";";
|
||||
font2String = "font-family: \"DejaVu Sans\";";
|
||||
tabBarPaddingTop = "0";
|
||||
tabBarPaddingSide = "9";
|
||||
textBrowserFontsize= "10";
|
||||
cashFontSize = "12";
|
||||
setLabelFontSize = "12";
|
||||
playerNameLabelFontSize = "11";
|
||||
smallBoardFontSize = "13";
|
||||
bigBoardFontSize = "17";
|
||||
humanPlayerButtonFontSize = "12";
|
||||
betValueFontSize = "10";
|
||||
#else //Linux
|
||||
font1String = "font-family: \"Nimbus Sans L\";";
|
||||
font2String = "font-family: \"DejaVu Sans\";";
|
||||
|
||||
tabBarPaddingTop = "0";
|
||||
tabBarPaddingSide = "9";
|
||||
#endif
|
||||
textBrowserFontsize= "10";
|
||||
cashFontSize = "10";
|
||||
setLabelFontSize = "10";
|
||||
@@ -61,7 +90,6 @@ GameTableStyleReader::GameTableStyleReader(ConfigFile *c, QWidget *w)
|
||||
humanPlayerButtonFontSize = "12";
|
||||
betValueFontSize = "10";
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +100,7 @@ GameTableStyleReader::~GameTableStyleReader()
|
||||
void GameTableStyleReader::readStyleFile(QString file)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
//on Android we currently just use the defaul style packed with the binary via qrc
|
||||
//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
|
||||
@@ -1206,10 +1234,10 @@ void GameTableStyleReader::readStyleFile(QString file)
|
||||
}
|
||||
|
||||
//set loadedSuccessfull TRUE if everything works
|
||||
// qDebug() << "leftitem is empty: " << leftItems.isEmpty() << "pics left is empty: " << itemPicsLeft.isEmpty() << "stylefileversion is: " << PokerTHStyleFileVersion;
|
||||
// qDebug() << "leftitem is empty: " << leftItems.isEmpty() << "pics left is empty: " << itemPicsLeft.isEmpty() << "stylefileversion is: " << PokerTHStyleFileVersion;
|
||||
if(leftItems.isEmpty() && itemPicsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_GT_STYLE_FILE_VERSION) {
|
||||
myState = GT_STYLE_OK;
|
||||
// qDebug() << "myState of: " << StyleDescription << "is now: " << myState;
|
||||
// qDebug() << "myState of: " << StyleDescription << "is now: " << myState;
|
||||
} else {
|
||||
//check for style file version
|
||||
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_GT_STYLE_FILE_VERSION) {
|
||||
@@ -1222,7 +1250,7 @@ void GameTableStyleReader::readStyleFile(QString file)
|
||||
if(!itemPicsLeft.isEmpty() && myW != 0) myState = GT_STYLE_PICTURES_MISSING;
|
||||
}
|
||||
|
||||
// qDebug() << "myState of: " << StyleDescription << "is now: " << myState;
|
||||
// qDebug() << "myState of: " << StyleDescription << "is now: " << myState;
|
||||
}
|
||||
loadedSuccessfull = 1;
|
||||
}
|
||||
@@ -1627,11 +1655,11 @@ void GameTableStyleReader::setSliderStyle(QSlider *s)
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= 0x040700
|
||||
#ifdef GUI_800x480
|
||||
#ifdef GUI_800x480
|
||||
s->setStyleSheet("QSlider::groove:horizontal { border: 2px solid #"+BetSpeedSliderGrooveBorderColor+";"+height+" background: #"+BetSpeedSliderGrooveBgColor+"; margin: 2px 0; border-radius: 2px; } QSlider::handle:horizontal { background: #"+BetSpeedSliderHandleBgColor+"; border: 2px solid #"+BetSpeedSliderHandleBorderColor+"; width: 40px; margin: -16px 0; border-radius: 4px;}");
|
||||
#else
|
||||
#else
|
||||
s->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #"+BetSpeedSliderGrooveBorderColor+";"+height+" background: #"+BetSpeedSliderGrooveBgColor+"; margin: 4px 0; border-radius: 2px; } QSlider::handle:horizontal { background: #"+BetSpeedSliderHandleBgColor+"; border: 1px solid #"+BetSpeedSliderHandleBorderColor+"; width: 12px; margin: -7px 0; border-radius: 4px;}");
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
s->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #"+BetSpeedSliderGrooveBorderColor+";"+height+" background: #"+BetSpeedSliderGrooveBgColor+"; margin: 4px 0; border-radius: 2px; } QSlider::handle:horizontal { background: #"+BetSpeedSliderHandleBgColor+"; border: 1px solid #"+BetSpeedSliderHandleBorderColor+"; width: 12px; margin: -2px 0; border-radius: 4px;}");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user