From 3e30ae1797f99e229866f5362372aebeeb10ce68 Mon Sep 17 00:00:00 2001
From: windingwind <33902321+windingwind@users.noreply.github.com>
Date: Fri, 19 Apr 2024 19:32:50 +0800
Subject: [PATCH] Fix dialog window titlebar on macOS (#4011)
After #4010
---
app/scripts/fetch_xulrunner | 3 ++-
chrome/content/scaffold/load.xhtml | 2 ++
chrome/content/zotero/attachLink.xhtml | 2 ++
chrome/content/zotero/bibliography.xhtml | 2 ++
chrome/content/zotero/createParentDialog.xhtml | 2 ++
chrome/content/zotero/exportOptions.xhtml | 2 ++
chrome/content/zotero/feedSettings.xhtml | 2 ++
chrome/content/zotero/ingester/selectitems.xhtml | 2 ++
chrome/content/zotero/longTagFixer.xhtml | 2 ++
chrome/content/zotero/newCollectionDialog.xhtml | 2 ++
chrome/content/zotero/searchDialog.xhtml | 2 ++
chrome/content/zotero/tagColorChooser.xhtml | 2 ++
12 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner
index 2b94c4deeb..56cba1c120 100755
--- a/app/scripts/fetch_xulrunner
+++ b/app/scripts/fetch_xulrunner
@@ -325,7 +325,7 @@ function modify_omni {
# Import style into built-in dialogs
replace_line 'id=\"commonDialogWindow\"' \
- 'id=\"commonDialogWindow\" class=\"zotero-dialog\"' \
+ 'id=\"commonDialogWindow\" class=\"zotero-dialog\" drawintitlebar-platforms=\"mac\"' \
chrome/toolkit/content/global/commonDialog.xhtml
replace_line '<\?xml-stylesheet href=\"chrome:\/\/global\/skin\/commonDialog.css\" type=\"text\/css\"\?>' \
'<\?xml-stylesheet href=\"chrome:\/\/global\/skin\/commonDialog.css\" type=\"text\/css\"\?>
@@ -337,6 +337,7 @@ function modify_omni {
try {
Services.dirsvc.get(\"ProfD\", Ci.nsIFile);
Services.scriptloader.loadSubScript(\"chrome:\/\/zotero\/content\/include.js\", this);
+ Services.scriptloader.loadSubScript(\"chrome:\/\/zotero\/content\/titlebar.js\", this);
Services.scriptloader.loadSubScript(\"chrome:\/\/zotero\/content\/customElements.js\", this);
} catch (e) {}' \
chrome/toolkit/content/global/commonDialog.xhtml
diff --git a/chrome/content/scaffold/load.xhtml b/chrome/content/scaffold/load.xhtml
index a161f08c9b..67e295dad8 100644
--- a/chrome/content/scaffold/load.xhtml
+++ b/chrome/content/scaffold/load.xhtml
@@ -32,12 +32,14 @@
diff --git a/chrome/content/zotero/attachLink.xhtml b/chrome/content/zotero/attachLink.xhtml
index bc1382fae9..bec59644a1 100644
--- a/chrome/content/zotero/attachLink.xhtml
+++ b/chrome/content/zotero/attachLink.xhtml
@@ -8,12 +8,14 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&zotero.attachLink.title;"
+ drawintitlebar-platforms="mac"
onload="Zotero_AttachLink.load()">