Fix progress window title bar on win and linux (#3915)
This commit is contained in:
parent
808fe9b665
commit
4d05367f1d
2 changed files with 6 additions and 1 deletions
|
@ -33,6 +33,8 @@
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
title="&zotero.progress.title;"
|
title="&zotero.progress.title;"
|
||||||
|
no-titlebar-icon="true"
|
||||||
|
drawintitlebar-platforms="win,linux"
|
||||||
width="300"
|
width="300"
|
||||||
windowtype="alert:alert">
|
windowtype="alert:alert">
|
||||||
|
|
||||||
|
@ -42,6 +44,9 @@
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
<script>
|
<script>
|
||||||
|
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
|
||||||
|
Services.scriptloader.loadSubScript("chrome://zotero/content/titlebar.js", this);
|
||||||
window.addEventListener("DOMContentLoaded", () => window.sizeToContent())
|
window.addEventListener("DOMContentLoaded", () => window.sizeToContent())
|
||||||
</script>
|
</script>
|
||||||
</window>
|
</window>
|
||||||
|
|
|
@ -52,7 +52,7 @@ window.addEventListener("load", function () {
|
||||||
window.document.documentElement.setAttribute('sizemode', 'normal');
|
window.document.documentElement.setAttribute('sizemode', 'normal');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Zotero.isWin) {
|
if (Zotero.isWin && !document.querySelector("window")?.hasAttribute("no-titlebar-icon")) {
|
||||||
let windowIcon = document.querySelector(".titlebar-icon");
|
let windowIcon = document.querySelector(".titlebar-icon");
|
||||||
// Simulate Windows window control
|
// Simulate Windows window control
|
||||||
windowIcon.addEventListener("dblclick", (ev) => {
|
windowIcon.addEventListener("dblclick", (ev) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue