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
This commit is contained in:
Abe Jellinek 2022-11-21 00:07:59 -05:00 committed by GitHub
parent 74492e40c4
commit 00b387afc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -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;

View file

@ -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(`
<image src="chrome://zotero/skin/searchbar-dropmarker${Zotero.hiDPISuffix}.png" width="7" height="4" class="toolbarbutton-menu-dropmarker"/>
<image src="chrome://zotero/skin/searchbar-dropmarker${hiDPISuffix}.png" width="7" height="4" class="toolbarbutton-menu-dropmarker"/>
`),
true
);