diff --git a/chrome/content/zotero/addCitationDialog.xul b/chrome/content/zotero/addCitationDialog.xul
index b288619791..d36dcf0180 100644
--- a/chrome/content/zotero/addCitationDialog.xul
+++ b/chrome/content/zotero/addCitationDialog.xul
@@ -41,6 +41,8 @@
+
+
@@ -137,4 +139,6 @@
+
+
diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js
index fc9c971d6b..58e6ccb692 100644
--- a/chrome/content/zotero/advancedSearch.js
+++ b/chrome/content/zotero/advancedSearch.js
@@ -13,6 +13,10 @@ var ZoteroAdvancedSearch = new function() {
function onLoad() {
_searchBox = document.getElementById('zotero-search-box');
+ // Set font size from pref
+ var sbc = document.getElementById('zotero-search-box-container');
+ Zotero.setFontSize(sbc);
+
var io = window.arguments[0];
_searchBox.search = io.dataIn.search;
}
diff --git a/chrome/content/zotero/advancedSearch.xul b/chrome/content/zotero/advancedSearch.xul
index 8ac3fb3af1..8371a3c18d 100644
--- a/chrome/content/zotero/advancedSearch.xul
+++ b/chrome/content/zotero/advancedSearch.xul
@@ -24,6 +24,8 @@
+
+
@@ -52,6 +54,8 @@
+
+
diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js
index 4089371a9c..e76732a9b8 100644
--- a/chrome/content/zotero/bibliography.js
+++ b/chrome/content/zotero/bibliography.js
@@ -39,6 +39,11 @@ var Zotero_File_Interface_Bibliography = new function() {
* loading
*/
function init() {
+ // Set font size from pref
+ // Affects bibliography.xul and integrationDocPrefs.xul
+ var sbc = document.getElementById('zotero-bibliography-container');
+ Zotero.setFontSize(sbc);
+
_io = window.arguments[0];
if(_io.wrappedJSObject){
_io = _io.wrappedJSObject;
diff --git a/chrome/content/zotero/bibliography.xul b/chrome/content/zotero/bibliography.xul
index 1f803b37a2..ad65dac6f1 100644
--- a/chrome/content/zotero/bibliography.xul
+++ b/chrome/content/zotero/bibliography.xul
@@ -7,24 +7,25 @@
id="zotero-bibliography"
onload="Zotero_File_Interface_Bibliography.init()">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/content/zotero/exportOptions.js b/chrome/content/zotero/exportOptions.js
index 24ed709172..c839747d27 100644
--- a/chrome/content/zotero/exportOptions.js
+++ b/chrome/content/zotero/exportOptions.js
@@ -38,6 +38,10 @@ var Zotero_File_Interface_Export = new function() {
* add options to export
*/
function init() {
+ // Set font size from pref
+ var sbc = document.getElementById('zotero-export-options-container');
+ Zotero.setFontSize(sbc);
+
var addedOptions = new Object();
var translators = window.arguments[0].translators;
diff --git a/chrome/content/zotero/exportOptions.xul b/chrome/content/zotero/exportOptions.xul
index ef59eff760..7725f420dc 100644
--- a/chrome/content/zotero/exportOptions.xul
+++ b/chrome/content/zotero/exportOptions.xul
@@ -7,17 +7,19 @@
ondialogcancel="Zotero_File_Interface_Export.cancel()"
id="zotero-export-options"
onload="Zotero_File_Interface_Export.init()">
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/content/zotero/ingester/selectitems.js b/chrome/content/zotero/ingester/selectitems.js
index c276a2f21f..6674123f49 100644
--- a/chrome/content/zotero/ingester/selectitems.js
+++ b/chrome/content/zotero/ingester/selectitems.js
@@ -41,6 +41,10 @@ var Zotero_Ingester_Interface_SelectItems = function() {}
* loading
*/
Zotero_Ingester_Interface_SelectItems.init = function() {
+ // Set font size from pref
+ var sbc = document.getElementById('zotero-select-items-container');
+ Zotero.setFontSize(sbc);
+
this.io = window.arguments[0];
var listbox = document.getElementById("zotero-selectitems-links");
diff --git a/chrome/content/zotero/ingester/selectitems.xul b/chrome/content/zotero/ingester/selectitems.xul
index 9b031bc988..55eb5d1ae1 100755
--- a/chrome/content/zotero/ingester/selectitems.xul
+++ b/chrome/content/zotero/ingester/selectitems.xul
@@ -12,12 +12,16 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/content/zotero/integrationDocPrefs.xul b/chrome/content/zotero/integrationDocPrefs.xul
index b374df06cd..6c9d53959f 100644
--- a/chrome/content/zotero/integrationDocPrefs.xul
+++ b/chrome/content/zotero/integrationDocPrefs.xul
@@ -7,14 +7,13 @@
id="zotero-bibliography"
onload="Zotero_File_Interface_Bibliography.init()">
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/content/zotero/note.js b/chrome/content/zotero/note.js
index 9af45fbded..e242733e5d 100644
--- a/chrome/content/zotero/note.js
+++ b/chrome/content/zotero/note.js
@@ -28,6 +28,9 @@ function onLoad()
noteEditor = document.getElementById('note-editor');
noteEditor.focus();
+ // Set font size from pref
+ Zotero.setFontSize(noteEditor);
+
var params = new Array();
var b = document.location.href.substr(document.location.href.indexOf('?')+1).split('&');
for(var i = 0; i < b.length; i++)
diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
index cd3b1dfdbc..dc8886b33f 100644
--- a/chrome/content/zotero/overlay.js
+++ b/chrome/content/zotero/overlay.js
@@ -116,19 +116,7 @@ var ZoteroPane = new function()
document.getElementById('zotero-tb-fullscreen').setAttribute('zoterotop','true');
}
- // Font size
- document.getElementById('zotero-pane').style.fontSize = Zotero.Prefs.get('fontSize') + 'em';
- var size = Zotero.Prefs.get('fontSize');
- if (size <= 1) {
- size = 'small';
- }
- else if (size <= 1.25) {
- size = 'medium';
- }
- else {
- size = 'large';
- }
- document.getElementById('zotero-pane').setAttribute('fontSize', size);
+ Zotero.setFontSize(document.getElementById('zotero-pane'))
//Initialize collections view
this.collectionsView = new Zotero.CollectionTreeView();
@@ -171,6 +159,7 @@ var ZoteroPane = new function()
Zotero.Keys.windowInit(document);
}
+
/*
* Called when the window closes
*/
diff --git a/chrome/content/zotero/searchDialog.js b/chrome/content/zotero/searchDialog.js
index cac1ad7a18..26a8e1e96c 100644
--- a/chrome/content/zotero/searchDialog.js
+++ b/chrome/content/zotero/searchDialog.js
@@ -4,6 +4,10 @@ var io;
function doLoad()
{
+ // Set font size from pref
+ var sbc = document.getElementById('zotero-search-box-container');
+ Zotero.setFontSize(sbc);
+
io = window.arguments[0];
document.getElementById('search-box').search = io.dataIn.search;
diff --git a/chrome/content/zotero/searchDialog.xul b/chrome/content/zotero/searchDialog.xul
index a17439f105..c5cd9cf80a 100644
--- a/chrome/content/zotero/searchDialog.xul
+++ b/chrome/content/zotero/searchDialog.xul
@@ -19,9 +19,11 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/chrome/content/zotero/selectItemsDialog.js b/chrome/content/zotero/selectItemsDialog.js
index 922af8bbc1..667ff602dc 100644
--- a/chrome/content/zotero/selectItemsDialog.js
+++ b/chrome/content/zotero/selectItemsDialog.js
@@ -31,11 +31,15 @@ var io;
*/
function doLoad()
{
+ // Set font size from pref
+ var sbc = document.getElementById('zotero-select-items-container');
+ Zotero.setFontSize(sbc);
+
io = window.arguments[0];
collectionsView = new Zotero.CollectionTreeView();
document.getElementById('zotero-collections-tree').view = collectionsView;
-
+
// move to center of screen
window.sizeToContent();
window.moveTo(
diff --git a/chrome/content/zotero/selectItemsDialog.xul b/chrome/content/zotero/selectItemsDialog.xul
index 85d580be05..21d4638e58 100644
--- a/chrome/content/zotero/selectItemsDialog.xul
+++ b/chrome/content/zotero/selectItemsDialog.xul
@@ -40,6 +40,8 @@
+
+
@@ -88,4 +90,6 @@
+
+
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
index d6cb34cffe..2e1546effd 100644
--- a/chrome/content/zotero/xpcom/zotero.js
+++ b/chrome/content/zotero/xpcom/zotero.js
@@ -49,6 +49,7 @@ var Zotero = new function(){
this.varDump = varDump;
this.safeDebug = safeDebug;
this.getString = getString;
+ this.setFontSize = setFontSize;
this.flattenArguments = flattenArguments;
this.getAncestorByTagName = getAncestorByTagName;
this.join = join;
@@ -319,6 +320,27 @@ var Zotero = new function(){
}
+ /*
+ * Sets font size based on prefs -- intended for use on root element
+ * (zotero-pane, note window, etc.)
+ */
+ function setFontSize(rootElement) {
+ var size = Zotero.Prefs.get('fontSize');
+ rootElement.style.fontSize = size + 'em';
+ if (size <= 1) {
+ size = 'small';
+ }
+ else if (size <= 1.25) {
+ size = 'medium';
+ }
+ else {
+ size = 'large';
+ }
+ // Custom attribute -- allows for additional customizations in zotero.css
+ rootElement.setAttribute('zoteroFontSize', size);
+ }
+
+
/*
* Flattens mixed arrays/values in a passed _arguments_ object and returns
* an array of values -- allows for functions to accept both arrays of
diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css
index 7430e8bf76..063787364e 100644
--- a/chrome/skin/default/zotero/overlay.css
+++ b/chrome/skin/default/zotero/overlay.css
@@ -1,26 +1,3 @@
-/* Font sizes */
-#zotero-pane[fontSize=medium] #zotero-tb-search, #zotero-pane[fontSize=large] #zotero-tb-search,
-#zotero-pane[fontSize=medium] zoterotagselector textbox, #zotero-pane[fontSize=large] zoterotagselector textbox
-{
- font-size: 1em !important;
-}
-
-#zotero-pane[fontSize=medium] treechildren::-moz-tree-row
-{
- height: 1.5em;
-}
-
-#zotero-pane[fontSize=large] treechildren::-moz-tree-row
-{
- height: 1.5em;
-}
-
-#zotero-pane[fontSize=large] .treecol-text
-{
- margin:0;
- padding:0;
-}
-
#zotero-status-bar-icon
{
width: 55px;
diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css
index 57ea383005..f9c14c43c5 100644
--- a/chrome/skin/default/zotero/zotero.css
+++ b/chrome/skin/default/zotero/zotero.css
@@ -1,3 +1,27 @@
+/* Font sizes */
+*[zoteroFontSize=medium] #zotero-tb-search, *[zoteroFontSize=large] #zotero-tb-search,
+*[zoteroFontSize=medium] zoterotagselector textbox, *[zoteroFontSize=large] zoterotagselector textbox
+{
+ font-size: 1em !important;
+}
+
+*[zoteroFontSize=medium] treechildren::-moz-tree-row
+{
+ height: 1.5em;
+}
+
+*[zoteroFontSize=large] treechildren::-moz-tree-row
+{
+ height: 1.5em;
+}
+
+*[zoteroFontSize=large] .treecol-text
+{
+ margin:0;
+ padding:0;
+}
+
+
#zotero-toolbar-button
{
list-style-image: url('chrome://zotero/skin/zotero-z-24px.png');