diff options
author | Andrew Dolgov <[email protected]> | 2014-01-25 22:18:26 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-01-25 22:18:26 +0400 |
commit | 8d279b67b6e23a438ac01d1972b97e05070928ad (patch) | |
tree | 44912e181fe7c1c6c67a04f1e501e1e8c02ad217 /src/org | |
parent | d75dc81c0d9e10175322a8ef59e8f25a40ef8276 (diff) |
use line-spacing on headlines; increase default line-height on articles
a bit
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/fox/ttrss/ArticleFragment.java | 24 | ||||
-rw-r--r-- | src/org/fox/ttrss/offline/OfflineArticleFragment.java | 24 |
2 files changed, 46 insertions, 2 deletions
diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index 3a6af9e9..396253c2 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -96,6 +96,28 @@ public class ArticleFragment extends Fragment { if (m_article != null) { + if (!useTitleWebView) { + View scroll = view.findViewById(R.id.article_scrollview); + + if (scroll != null) { + final float scale = getResources().getDisplayMetrics().density; + + if (m_activity.isSmallScreen()) { + scroll.setPadding((int)(8 * scale + 0.5f), + (int)(5 * scale + 0.5f), + (int)(8 * scale + 0.5f), + 0); + } else { + scroll.setPadding((int)(25 * scale + 0.5f), + (int)(10 * scale + 0.5f), + (int)(25 * scale + 0.5f), + 0); + + } + + } + } + int articleFontSize = Integer.parseInt(m_prefs.getString("article_font_size_sp", "16")); int articleSmallFontSize = Math.max(10, Math.min(18, articleFontSize - 2)); @@ -286,7 +308,7 @@ public class ArticleFragment extends Fragment { "<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" + "<meta name=\"viewport\" content=\"width=device-width, user-scalable=no\" />" + "<style type=\"text/css\">" + - "body { padding : 0px; margin : 0px; line-height : 120%; }" + + "body { padding : 0px; margin : 0px; line-height : 130%; }" + "img { max-width : 100%; width : auto; height : auto; }" + cssOverride + "</style>" + diff --git a/src/org/fox/ttrss/offline/OfflineArticleFragment.java b/src/org/fox/ttrss/offline/OfflineArticleFragment.java index 59838ea7..9042421b 100644 --- a/src/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -133,6 +133,28 @@ public class OfflineArticleFragment extends Fragment { m_cursor.moveToFirst(); if (m_cursor.isFirst()) { + if (!useTitleWebView) { + View scroll = view.findViewById(R.id.article_scrollview); + + if (scroll != null) { + final float scale = getResources().getDisplayMetrics().density; + + if (m_activity.isSmallScreen()) { + scroll.setPadding((int)(8 * scale + 0.5f), + (int)(5 * scale + 0.5f), + (int)(8 * scale + 0.5f), + 0); + } else { + scroll.setPadding((int)(25 * scale + 0.5f), + (int)(10 * scale + 0.5f), + (int)(25 * scale + 0.5f), + 0); + + } + + } + } + int articleFontSize = Integer.parseInt(m_prefs.getString("article_font_size_sp", "16")); int articleSmallFontSize = Math.max(10, Math.min(18, articleFontSize - 2)); @@ -305,7 +327,7 @@ public class OfflineArticleFragment extends Fragment { "<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" + "<meta name=\"viewport\" content=\"width=device-width, user-scalable=no\" />" + "<style type=\"text/css\">" + - "body { padding : 0px; margin : 0px; line-height : 120%; }" + + "body { padding : 0px; margin : 0px; line-height : 130%; }" + cssOverride + "img { max-width : 100%; width : auto; height : auto; }" + "</style>" + |