summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/preferencesdialog.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-07 07:57:56 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-07 07:57:56 +0000
commitffc1afc30dc4343a3b1630c6b4ebd25570ac8d2d (patch)
tree287a68f2259b0b03a13ec1244635d006eeffb222 /utils/themeeditor/preferencesdialog.cpp
parent4a9398e3fcb0c2d4d688a914077e891b053fe07f (diff)
downloadrockbox-ffc1afc30dc4343a3b1630c6b4ebd25570ac8d2d.tar.gz
rockbox-ffc1afc30dc4343a3b1630c6b4ebd25570ac8d2d.tar.bz2
rockbox-ffc1afc30dc4343a3b1630c6b4ebd25570ac8d2d.zip
Theme Editor: Added font selection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26650 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/preferencesdialog.cpp')
-rw-r--r--utils/themeeditor/preferencesdialog.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/utils/themeeditor/preferencesdialog.cpp b/utils/themeeditor/preferencesdialog.cpp
index 4d3ad04495..79f781c1ca 100644
--- a/utils/themeeditor/preferencesdialog.cpp
+++ b/utils/themeeditor/preferencesdialog.cpp
@@ -42,6 +42,7 @@ PreferencesDialog::~PreferencesDialog()
void PreferencesDialog::loadSettings()
{
loadColors();
+ loadFont();
}
void PreferencesDialog::loadColors()
@@ -83,9 +84,25 @@ void PreferencesDialog::loadColors()
settings.endGroup();
}
+void PreferencesDialog::loadFont()
+{
+ QSettings settings;
+ settings.beginGroup("SkinDocument");
+
+ QVariant family = settings.value("fontFamily", QFont());
+ int size = settings.value("fontSize", 12).toInt();
+
+ settings.endGroup();
+
+ ui->fontSelect->setCurrentFont(family.value<QFont>());
+ ui->fontSize->setValue(size);
+
+}
+
void PreferencesDialog::saveSettings()
{
saveColors();
+ saveFont();
}
void PreferencesDialog::saveColors()
@@ -111,6 +128,17 @@ void PreferencesDialog::saveColors()
settings.endGroup();
}
+void PreferencesDialog::saveFont()
+{
+ QSettings settings;
+ settings.beginGroup("SkinDocument");
+
+ settings.setValue("fontFamily", ui->fontSelect->currentFont());
+ settings.setValue("fontSize", ui->fontSize->value());
+
+ settings.endGroup();
+}
+
void PreferencesDialog::setupUI()
{
/* Connecting color buttons */