From 326d2bc1e34190a9be68d6b946466dc3a484f105 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 31 May 2014 01:42:31 -0400 Subject: [PATCH] Enforce minimum note font size of 6px https://forums.zotero.org/discussion/37147/ --- chrome/content/zotero/bindings/styled-textbox.xml | 2 +- chrome/content/zotero/xpcom/zotero.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml index 9cb967fa8b..8d2b596431 100644 --- a/chrome/content/zotero/bindings/styled-textbox.xml +++ b/chrome/content/zotero/bindings/styled-textbox.xml @@ -436,7 +436,7 @@ + "body#zotero-tinymce-note.mceContentBody td, " + "body#zotero-tinymce-note.mceContentBody pre { " + "font-size: " - + Zotero.Prefs.get('note.fontSize') + "px; " + + Math.max(6, Zotero.Prefs.get('note.fontSize')) + "px; " + "} " + "body#zotero-tinymce-note.mceContentBody, " + "body#zotero-tinymce-note.mceContentBody p { " diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 1007d4e429..9a2d3e03ec 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -2349,6 +2349,13 @@ Zotero.Prefs = new function(){ } break; + case "note.fontSize": + var val = this.get('note.fontSize'); + if (val < 6) { + this.set('note.fontSize', 6); + } + break; + case "zoteroDotOrgVersionHeader": if (this.get("zoteroDotOrgVersionHeader")) { Zotero.VersionHeader.register();