[evolution/gnome-3-16] Bug 749149 - Text in composer ignores desktop scaling factor
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-16] Bug 749149 - Text in composer ignores desktop scaling factor
- Date: Mon, 1 Jun 2015 12:43:48 +0000 (UTC)
commit eaee8b4ed9b341787605be510f9f1aa1f00c3f0b
Author: Tomas Popela <tpopela redhat com>
Date: Mon Jun 1 14:39:23 2015 +0200
Bug 749149 - Text in composer ignores desktop scaling factor
We have to set the minimum font size in EHTMLEditorView (we were
doing in for the preview in EWebView, but not for editor).
e-util/e-html-editor-view.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index b887f94..00cbb8a 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -10455,7 +10455,7 @@ e_html_editor_view_update_fonts (EHTMLEditorView *view)
const gchar *styles[] = { "normal", "oblique", "italic" };
const gchar *smoothing = NULL;
GString *stylesheet;
- PangoFontDescription *ms, *vw;
+ PangoFontDescription *min_size, *ms, *vw;
WebKitWebSettings *settings;
g_return_if_fail (E_IS_HTML_EDITOR_VIEW (view));
@@ -10824,13 +10824,19 @@ e_html_editor_view_update_fonts (EHTMLEditorView *view)
g_string_append (stylesheet, base64);
g_free (base64);
+ if (pango_font_description_get_size (ms) < pango_font_description_get_size (vw) ||
!view->priv->html_mode)
+ min_size = ms;
+ else
+ min_size = vw;
+
settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (view));
g_object_set (
G_OBJECT (settings),
"default-font-size", pango_font_description_get_size (vw) / PANGO_SCALE,
"default-font-family", pango_font_description_get_family (vw),
"monospace-font-family", pango_font_description_get_family (ms),
- "default-monospace-font-size", (pango_font_description_get_size (ms) / PANGO_SCALE),
+ "default-monospace-font-size", pango_font_description_get_size (ms) / PANGO_SCALE,
+ "minimum-font-size", pango_font_description_get_size (min_size) / PANGO_SCALE,
"user-stylesheet-uri", stylesheet->str,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]