From 9077b2f4951c337b34b70fbd08657a97f0e91e0a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 21 Jul 2016 14:07:27 -0400 Subject: [PATCH] Fix display of some icons in Standalone --- chrome/content/zotero/overlay.js | 6 +----- chrome/content/zotero/xpcom/zotero.js | 2 ++ chrome/content/zotero/zoteroPane.js | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 1f946da9d..c12a3a010 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -86,9 +86,7 @@ var ZoteroOverlay = new function() observerService.addObserver(zoteroObserver, "browser-delayed-startup-finished", false); - // Set flags for hi-res displays - Zotero.hiDPI = window.devicePixelRatio > 1; - Zotero.hiDPISuffix = Zotero.hiDPI ? "@2x" : ""; + ZoteroPane.init(); // Clear old Zotero icon pref var prefBranch = Components.classes["@mozilla.org/preferences-service;1"] @@ -105,8 +103,6 @@ var ZoteroOverlay = new function() Zotero.logError(e); } - ZoteroPane.init(); - // TODO: Add only when progress window is open document.getElementById('appcontent').addEventListener('mousemove', Zotero.ProgressWindowSet.updateTimers, false); diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 4b9d90b07..c801c5378 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -103,6 +103,8 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); this.unlockDeferred; this.unlockPromise; + this.hiDPISuffix = ""; + var _startupErrorHandler; var _zoteroDirectory = false; var _localizedStringBundle; diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index d49f5c32d..b52cbf9ef 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -82,6 +82,10 @@ var ZoteroPane = new function() window.document.documentElement.setAttribute('sizemode', 'normal'); } + // Set flags for hi-res displays + Zotero.hiDPI = window.devicePixelRatio > 1; + Zotero.hiDPISuffix = Zotero.hiDPI ? "@2x" : ""; + // Set "Report Errors..." label via property rather than DTD entity, // since we need to reference it in script elsewhere document.getElementById('zotero-tb-actions-reportErrors').setAttribute('label',