summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/data/CMakeLists.txt7
-rw-r--r--src/data/Nunito-Regular.ttfbin49792 -> 0 bytes
-rw-r--r--src/data/home.html13
-rw-r--r--src/data/rekonqinfo.html11
-rw-r--r--src/rekonqpage/newtabpage.cpp6
-rw-r--r--src/webtab/protocolhandler.cpp3
-rw-r--r--src/webtab/webpage.cpp6
7 files changed, 17 insertions, 29 deletions
diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt
index f3609634..ea7d05c7 100644
--- a/src/data/CMakeLists.txt
+++ b/src/data/CMakeLists.txt
@@ -13,13 +13,6 @@ INSTALL(
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
-# fonts files
-INSTALL(
- FILES
- Nunito-Regular.ttf
- DESTINATION ${DATA_INSTALL_DIR}/rekonq/fonts
-)
-
# default bookmarks
INSTALL(
FILES
diff --git a/src/data/Nunito-Regular.ttf b/src/data/Nunito-Regular.ttf
deleted file mode 100644
index 3b0f067c..00000000
--- a/src/data/Nunito-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/src/data/home.html b/src/data/home.html
index 4f4eb7ba..428030c6 100644
--- a/src/data/home.html
+++ b/src/data/home.html
@@ -8,6 +8,7 @@ To let it work you need to set also some variables
about (prepend a $ to actually use them):
DEFAULT_PATH = rekonq default installation files path
+GENERAL_FONT = general font family
...
-->
@@ -23,20 +24,14 @@ DEFAULT_PATH = rekonq default installation files path
/* -------------------------------------------------------- */
/* generic styles */
-@font-face {
- font-family: 'Nunito';
- src: url($DEFAULT_PATH/fonts/Nunito-Regular.ttf);
- font-weight: normal;
- font-style: normal;
-}
-
html {
height:100%;
}
body {
background: url($DEFAULT_PATH/pics/background.png) repeat-y center #fff;
- font-family: 'Nunito', sans-serif;
+ font-family: $GENERAL_FONT;
+ font-weight: 500;
font-size: 0.9em;
}
@@ -65,7 +60,7 @@ a:hover {
input {
min-width: 180px;
- font-family: 'Nunito', sans-serif;
+ font-family: $GENERAL_FONT;
font-size: 0.8em;
}
diff --git a/src/data/rekonqinfo.html b/src/data/rekonqinfo.html
index 1bf77ac1..861b6f35 100644
--- a/src/data/rekonqinfo.html
+++ b/src/data/rekonqinfo.html
@@ -10,6 +10,7 @@ about (prepend a $ to actually use them):
DEFAULT_PATH = rekonq default installation files path
PAGE_TITLE = page title
MAIN_CONTENT = page main content
+GENERAL_FONT = general font family
...
-->
@@ -27,18 +28,12 @@ html{
padding:0;
}
-@font-face {
- font-family: 'Nunito';
- src: url($DEFAULT_PATH/fonts/Nunito-Regular.ttf);
- font-weight: normal;
- font-style: normal;
-}
-
body{
background: url($DEFAULT_PATH/pics/background.png) repeat-y center #bbb;
margin:0;
padding:0;
- font-family: 'Nunito', sans-serif;
+ font-family: $GENERAL_FONT;
+ font-weight: 500;
font-size: 0.9em;
}
diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp
index 48b567de..7857b7d9 100644
--- a/src/rekonqpage/newtabpage.cpp
+++ b/src/rekonqpage/newtabpage.cpp
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
-* Copyright (C) 2009-2012 by Andrea Diamantini <adjam7 at gmail dot com>
+* Copyright (C) 2009-2013 by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2010 by Matthieu Gicquel <matgic78 at gmail dot com>
*
*
@@ -86,6 +86,7 @@ NewTabPage::NewTabPage(QWebFrame *frame)
{
m_html = file.readAll();
m_html.replace(QL1S("$DEFAULT_PATH"), dataPath);
+ m_html.replace(QL1S("$GENERAL_FONT"), QWebSettings::globalSettings()->fontFamily(QWebSettings::StandardFont));
}
}
@@ -1024,7 +1025,8 @@ void NewTabPage::initJS()
dataPath.remove(QL1S("/htmls/home.html"));
includes.replace(QL1S("$DEFAULT_PATH"), dataPath);
-
+ includes.replace(QL1S("$GENERAL_FONT"), QWebSettings::globalSettings()->fontFamily(QWebSettings::StandardFont));
+
oldHTML.replace(QL1S("<head>"), includes);
QString javascript;
diff --git a/src/webtab/protocolhandler.cpp b/src/webtab/protocolhandler.cpp
index 4cf61be5..886bec1e 100644
--- a/src/webtab/protocolhandler.cpp
+++ b/src/webtab/protocolhandler.cpp
@@ -398,7 +398,8 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list)
html.replace(QL1S("$DEFAULT_PATH"), dataPath);
html.replace(QL1S("$PAGE_TITLE"), title);
html.replace(QL1S("$MAIN_CONTENT"), msg);
-
+ html.replace(QL1S("$GENERAL_FONT"), QWebSettings::globalSettings()->fontFamily(QWebSettings::StandardFont));
+
return html;
}
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 522d13a3..82c5cf60 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -721,7 +721,8 @@ QString WebPage::errorPage(QNetworkReply *reply)
html.replace(QL1S("$DEFAULT_PATH"), dataPath);
html.replace(QL1S("$PAGE_TITLE"), title);
html.replace(QL1S("$MAIN_CONTENT"), msg);
-
+ html.replace(QL1S("$GENERAL_FONT"), QWebSettings::globalSettings()->fontFamily(QWebSettings::StandardFont));
+
return html;
}
@@ -767,7 +768,8 @@ QString WebPage::errorPage(QNetworkReply *reply)
html.replace(QL1S("$DEFAULT_PATH"), dataPath);
html.replace(QL1S("$PAGE_TITLE"), title);
html.replace(QL1S("$MAIN_CONTENT"), msg);
-
+ html.replace(QL1S("$GENERAL_FONT"), QWebSettings::globalSettings()->fontFamily(QWebSettings::StandardFont));
+
return html;
}