diff options
author | Andrew Dolgov <[email protected]> | 2013-11-21 11:46:25 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-11-21 11:46:25 +0400 |
commit | e6295be411aa4233de0db4e7a9e0515621d25a1a (patch) | |
tree | ff7b1efe57318ca48e496a27b407276deb1b8fc6 /src/org | |
parent | 0d6b35373db9ca8b75a874f69bc0045614918a84 (diff) |
set article content webview font size properly
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/fox/ttrss/ArticleFragment.java | 8 | ||||
-rw-r--r-- | src/org/fox/ttrss/offline/OfflineArticleFragment.java | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index d2b94b98..9cca02c6 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -235,15 +235,17 @@ public class ArticleFragment extends Fragment { String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justify;" : ""; + cssOverride += "body { "+align+" } "; + switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) { case 0: - cssOverride += "body { "+align+" font-size : 14px; } "; + ws.setDefaultFontSize(13); break; case 1: - cssOverride += "body { "+align+" font-size : 16px; } "; + ws.setDefaultFontSize(16); break; case 2: - cssOverride += "body { "+align+" font-size : 20px; } "; + ws.setDefaultFontSize(18); break; } diff --git a/src/org/fox/ttrss/offline/OfflineArticleFragment.java b/src/org/fox/ttrss/offline/OfflineArticleFragment.java index 248827cd..a35982d0 100644 --- a/src/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -262,15 +262,17 @@ public class OfflineArticleFragment extends Fragment { String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justified" : ""; + cssOverride += "body { "+align+" } "; + switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) { case 0: - cssOverride += "body { "+align+"; font-size : 14px; } "; + ws.setDefaultFontSize(13); break; case 1: - cssOverride += "body { "+align+"; font-size : 16px; } "; + ws.setDefaultFontSize(16); break; case 2: - cssOverride += "body { "+align+"; font-size : 20px; } "; + ws.setDefaultFontSize(18); break; } |