summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-03-01 12:10:53 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-03-01 12:10:53 +0100
commitea94738bf6c59ce254a6f177e978814019c856a4 (patch)
treeb79c4c22114ee1bbc3133bfa56ec8ef7146ddccf /src/mainwindow.cpp
parentRemoved unuseful headers (diff)
downloadrekonq-ea94738bf6c59ce254a6f177e978814019c856a4.tar.xz
Fixing Font Troubles. Try 1..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 07b0fb9c..5a591883 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -51,6 +51,8 @@
#include <KMessageBox>
#include <KFileDialog>
#include <KMenu>
+#include <KGlobalSettings>
+
// Qt Includes
#include <QPlainTextEdit>
@@ -302,12 +304,28 @@ void MainWindow::slotUpdateConf()
m_homePage = ReKonfig::homePage();
// =========== Fonts ==============
- QFont standardFont = ReKonfig::standardFont();
- QFont fixedFont = ReKonfig::fixedFont();
-
QWebSettings *defaultSettings = QWebSettings::globalSettings();
+
+ QFont standardFont = ReKonfig::standardFont();
+ if( !standardFont.exactMatch() )
+ {
+ kWarning() << "Webkit Standard Font doesn't match! Setting to KDE general font..";
+ standardFont = KGlobalSettings::generalFont();
+ ReKonfig::setStandardFont( standardFont );
+ ReKonfig::self()->writeConfig();
+ }
defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
+
+
+ QFont fixedFont = ReKonfig::fixedFont();
+ if( !fixedFont.exactMatch() )
+ {
+ kWarning() << "Webkit Fixed Font doesn't match! Setting to KDE fixed font..";
+ fixedFont = KGlobalSettings::fixedFont();
+ ReKonfig::setFixedFont( fixedFont );
+ ReKonfig::self()->writeConfig();
+ }
defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());