summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/skindocument.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/skindocument.cpp
parent4a9398e3fcb0c2d4d688a914077e891b053fe07f (diff)
downloadrockbox-ffc1afc30dc4343a3b1630c6b4ebd25570ac8d2d.tar.gz
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/skindocument.cpp')
-rw-r--r--utils/themeeditor/skindocument.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp
index fbb33cc366..730d03a0a6 100644
--- a/utils/themeeditor/skindocument.cpp
+++ b/utils/themeeditor/skindocument.cpp
@@ -65,7 +65,7 @@ SkinDocument::~SkinDocument()
void SkinDocument::connectPrefs(PreferencesDialog* prefs)
{
QObject::connect(prefs, SIGNAL(accepted()),
- this, SLOT(colorsChanged()));
+ this, SLOT(settingsChanged()));
QObject::connect(prefs, SIGNAL(accepted()),
highlighter, SLOT(loadSettings()));
}
@@ -124,10 +124,10 @@ void SkinDocument::setupUI()
QObject::connect(editor, SIGNAL(textChanged()),
this, SLOT(codeChanged()));
- colorsChanged();
+ settingsChanged();
}
-void SkinDocument::colorsChanged()
+void SkinDocument::settingsChanged()
{
/* Setting the editor colors */
QSettings settings;
@@ -140,6 +140,12 @@ void SkinDocument::colorsChanged()
palette.setColor(QPalette::All, QPalette::Text, fg);
editor->setPalette(palette);
+
+ /* Setting the font */
+ QFont family = settings.value("fontFamily", QFont()).value<QFont>();
+ family.setPointSize(settings.value("fontSize", 12).toInt());
+ editor->setFont(family);
+
editor->repaint();
settings.endGroup();