From e918b430b68576984a1c790c7e49c74dfd0c9b78 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 20 Dec 2020 04:20:39 -0500 Subject: [PATCH] Fix Quick Format dialog appearance on Big Sur, and tweak on <=10.15 The Quick Format dialog's shape is based on the OS window corners, and that changed on Big Sur, which resulted in whitespace along the bottom edge and a misaligned search results box. The tops of the citation bubbles were also cut off (at least for me) on Catalina. --- chrome/content/zotero-platform/mac-big-sur/style.css | 9 +++++++++ chrome/content/zotero-platform/mac/integration.css | 5 +++-- chrome/content/zotero/integration/quickFormat.js | 2 +- chrome/content/zotero/integration/quickFormat.xul | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero-platform/mac-big-sur/style.css b/chrome/content/zotero-platform/mac-big-sur/style.css index 077a99cec4..e206c02b41 100644 --- a/chrome/content/zotero-platform/mac-big-sur/style.css +++ b/chrome/content/zotero-platform/mac-big-sur/style.css @@ -10,3 +10,12 @@ tabs > tab[visuallyselected="true"] hbox > .tab-text { color: black !important; text-shadow: none; } + +/* Quick Format dialog, which is based on window corners, which are different on Big Sur */ +#quick-format-dialog #zotero-icon { + margin-top: 2px; +} + +#quick-format-iframe { + margin-top: 2px; +} \ No newline at end of file diff --git a/chrome/content/zotero-platform/mac/integration.css b/chrome/content/zotero-platform/mac/integration.css index d198b0a17e..f8287e5007 100644 --- a/chrome/content/zotero-platform/mac/integration.css +++ b/chrome/content/zotero-platform/mac/integration.css @@ -36,7 +36,7 @@ body[multiline="true"] { } #quick-format-search:not([multiline="true"]) { - padding-top: 4.5px; + padding-top: 3.5px; height: 37px !important; } @@ -46,7 +46,7 @@ body[multiline="true"] { } #zotero-icon { - margin: -2.5px 0 3px -6px; + margin: -2px 0 3px -6px; } #quick-format-search[multiline="true"] #zotero-icon { @@ -107,5 +107,6 @@ panel button:-moz-focusring { } .quick-format-bubble { + margin-top: 0; padding: 1px 6px 1px 6px; } \ No newline at end of file diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index d376fd5db7..bf32e7cd4f 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -88,7 +88,7 @@ var Zotero_QuickFormat = new function () { // With fx60 and drawintitlebar=true Firefox calculates the minHeight // as titlebar+maincontent, so we have hack around that here. if (Zotero.isMac && Zotero.platformMajorVersion >= 60) { - qfb.style.marginBottom = "-22px"; + qfb.style.marginBottom = "-28px"; } // add labels to popup diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul index d05cbd2f1f..0280e4af49 100644 --- a/chrome/content/zotero/integration/quickFormat.xul +++ b/chrome/content/zotero/integration/quickFormat.xul @@ -28,6 +28,7 @@ +