summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-01 21:50:06 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-01 21:58:47 +0300
commit721e1aa49134fb55241728528256b8662a5bb160 (patch)
tree6eaf4063c107f7b3f6ba433856da89de85525790 /src
parentf466978d005e3a0e3148f304b075c6a9d9a2760b (diff)
downloadplus-721e1aa49134fb55241728528256b8662a5bb160.tar.gz
plus-721e1aa49134fb55241728528256b8662a5bb160.tar.bz2
plus-721e1aa49134fb55241728528256b8662a5bb160.tar.xz
plus-721e1aa49134fb55241728528256b8662a5bb160.zip
add theme default font size depend on screen density.
Diffstat (limited to 'src')
-rw-r--r--src/defaults.cpp6
-rw-r--r--src/gui/theme.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 6105e81d2..045b007f0 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -21,13 +21,15 @@
#include "defaults.h"
-#include "utils/stringutils.h"
-
#include "being.h"
#include "client.h"
#include "graphics.h"
+#include "graphicsmanager.h"
#include "keydata.h"
+#include "utils/stringutils.h"
+
+
#include <stdlib.h>
#include "debug.h"
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 56598ade1..565391ed9 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1205,6 +1205,8 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName)
ThemeInfo *info = new ThemeInfo();
+ const std::string fontSize2 = "fontSize_" + mScreenDensity;
+ const std::string npcfontSize2 = "npcfontSize_" + mScreenDensity;
for_each_xml_child_node(infoNode, rootNode)
{
if (xmlNameEqual(infoNode, "name"))
@@ -1227,6 +1229,10 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName)
readIntValue(fontSize);
else if (xmlNameEqual(infoNode, "npcfontSize"))
readIntValue(npcfontSize);
+ else if (xmlNameEqual(infoNode, fontSize2.c_str()))
+ readIntValue(fontSize);
+ else if (xmlNameEqual(infoNode, npcfontSize2.c_str()))
+ readIntValue(npcfontSize);
}
return info;
}