diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index b992ec4c..64e68264 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -352,11 +352,11 @@ AppearanceSettingsPage::AppearanceSettingsPage() connect(&minPlayersForMultiColumnLayoutEdit, SIGNAL(valueChanged(int)), settingsCache, SLOT(setMinPlayersForMultiColumnLayout(int))); minPlayersForMultiColumnLayoutLabel.setBuddy(&minPlayersForMultiColumnLayoutEdit); + connect(&maxFontSizeForCardsEdit, SIGNAL(valueChanged(int)), settingsCache, SLOT(setMaxFontSize(int))); + maxFontSizeForCardsEdit.setValue(settingsCache->getMaxFontSize()); + maxFontSizeForCardsLabel.setBuddy(&maxFontSizeForCardsEdit); maxFontSizeForCardsEdit.setMinimum(9); maxFontSizeForCardsEdit.setMaximum(100); - maxFontSizeForCardsEdit.setValue(settingsCache->getMaxFontSize()); - connect(&maxFontSizeForCardsEdit, SIGNAL(valueChanged(int)), settingsCache, SLOT(setMaxFontSize(int))); - maxFontSizeForCardsLabel.setBuddy(&maxFontSizeForCardsEdit); QGridLayout *tableGrid = new QGridLayout; tableGrid->addWidget(&invertVerticalCoordinateCheckBox, 0, 0, 1, 2); diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index d54e58ea..bf7f9dea 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -233,6 +233,8 @@ SettingsCache::SettingsCache() soundEnabled = settings->value("sound/enabled", false).toBool(); soundThemeName = settings->value("sound/theme").toString(); + maxFontSize = settings->value("game/maxfontsize", DEFAULT_FONT_SIZE).toInt(); + priceTagFeature = settings->value("deckeditor/pricetags", false).toBool(); priceTagSource = settings->value("deckeditor/pricetagsource", 0).toInt(); diff --git a/cockatrice/src/settingscache.h b/cockatrice/src/settingscache.h index 6a825e88..d5fe4e9a 100644 --- a/cockatrice/src/settingscache.h +++ b/cockatrice/src/settingscache.h @@ -24,6 +24,8 @@ class ReleaseChannel; #define DEFAULT_LANG_CODE "en" #define DEFAULT_LANG_NAME "English" +#define DEFAULT_FONT_SIZE 12 + class QSettings; class SettingsCache : public QObject { @@ -188,7 +190,7 @@ public: bool getSpectatorsCanSeeEverything() const { return spectatorsCanSeeEverything; } bool getRememberGameSettings() const { return rememberGameSettings; } int getKeepAlive() const { return keepalive; } - int getMaxFontSize() const { return (maxFontSize > 1) ? maxFontSize : 9; } + int getMaxFontSize() const { return maxFontSize; } void setClientID(QString clientID); void setKnownMissingFeatures(QString _knownMissingFeatures); QString getClientID() { return clientID; }