From 00b387afc2187581ab15dbcc2362f9961976d328 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 21 Nov 2022 00:07:59 -0500 Subject: [PATCH] fx-compat: Toolbar fixes (#2922) - Don't rely on Zotero.hiDPISuffix being initialized in menuToolbarbutton.js -- it probably hasn't been at the time that the code that creates the dropmarker is running - Fix merge mistake that created a duplicate block of CSS --- chrome/content/zotero-platform/mac/overlay.css | 5 ----- chrome/content/zotero/elements/menuToolbarbutton.js | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css index 067b5f84b1..d8c075e7ac 100644 --- a/chrome/content/zotero-platform/mac/overlay.css +++ b/chrome/content/zotero-platform/mac/overlay.css @@ -34,11 +34,6 @@ padding: 4px 4px 4px 11px; } -.zotero-tb-button > .toolbarbutton-icon { - background: url("chrome://zotero/skin/mac/menubutton-start.png") left center/auto 24px no-repeat; - padding: 4px 4px 4px 11px; -} - /* For menu buttons, decrease left padding by 1px */ .zotero-tb-button[type=menu] > .toolbarbutton-icon { padding-left: 9px; diff --git a/chrome/content/zotero/elements/menuToolbarbutton.js b/chrome/content/zotero/elements/menuToolbarbutton.js index 54b956957b..a419257669 100644 --- a/chrome/content/zotero/elements/menuToolbarbutton.js +++ b/chrome/content/zotero/elements/menuToolbarbutton.js @@ -58,9 +58,11 @@ } static get dropmarkerFragment() { + // Zotero.hiDPI[Suffix] may not have been initialized yet, so calculate it ourselves + let hiDPISuffix = window.devicePixelRatio > 1 ? '@2x' : ''; let frag = document.importNode( MozXULElement.parseXULToFragment(` - + `), true );