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/ingester/selectitems.xhtml b/chrome/content/zotero/ingester/selectitems.xhtml index 218fde36c1..4c2da40d4f 100755 --- a/chrome/content/zotero/ingester/selectitems.xhtml +++ b/chrome/content/zotero/ingester/selectitems.xhtml @@ -34,6 +34,7 @@ class="zotero-dialog" title="&zotero.selectitems.title;" width="400" height="330" persist="width height screenX screenY" + drawintitlebar-platforms="mac" onload="Zotero_Ingester_Interface_SelectItems.init()"> var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); Services.scriptloader.loadSubScript("chrome://zotero/content/include.js", this); + Services.scriptloader.loadSubScript("chrome://zotero/content/titlebar.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/ingester/selectitems.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/customElements.js", this); diff --git a/chrome/content/zotero/longTagFixer.xhtml b/chrome/content/zotero/longTagFixer.xhtml index fb29a62ea2..1980471722 100644 --- a/chrome/content/zotero/longTagFixer.xhtml +++ b/chrome/content/zotero/longTagFixer.xhtml @@ -10,6 +10,7 @@ title="&zotero.sync.error;" id="zotero-long-tag-fixer-window" class="zotero-dialog" + drawintitlebar-platforms="mac" onload="Zotero_Long_Tag_Fixer.init()"> diff --git a/chrome/content/zotero/searchDialog.xhtml b/chrome/content/zotero/searchDialog.xhtml index 984f1c6a8e..91da62bec6 100644 --- a/chrome/content/zotero/searchDialog.xhtml +++ b/chrome/content/zotero/searchDialog.xhtml @@ -11,6 +11,7 @@ orient="vertical" onload="doLoad();" onunload="doUnload();" + drawintitlebar-platforms="mac" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" style="padding:2em"> @@ -21,6 +22,7 @@ diff --git a/chrome/content/zotero/tagColorChooser.xhtml b/chrome/content/zotero/tagColorChooser.xhtml index 2a799c3592..d8eccbd51c 100644 --- a/chrome/content/zotero/tagColorChooser.xhtml +++ b/chrome/content/zotero/tagColorChooser.xhtml @@ -34,6 +34,7 @@ xmlns:html="http://www.w3.org/1999/xhtml" title="&zotero.tagColorChooser.title;" onload="Zotero_Tag_Color_Chooser.init()" + drawintitlebar-platforms="mac" width="350" height="140">