From 75e6e46fb6988fa358b3d4c1f6489f1aa4234608 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Mon, 26 Aug 2024 23:20:53 -0700 Subject: [PATCH] Qf: potential fix to the dialog becoming invisible (#4603) * qf: remove transparent window background from win Because it seems to still sometimes cause the qf window to disappear. I could not reproduce it but disabling background: transparent did help with the issue of qf disappearing in the past. It allows us to remove very specific chromemargins which, apparently, do not work in all cases. Removed border-radius from qf on windows because now that the window is not transparent, its corners would be visible. But the window itself has rounded corners so it doesn't look that different. The main drawback now is that a secondary window without titlebar on win becomes resizable, and having background: transparent was a workaround to disable that. So now, we set max width and height so that the window cannot be stretched but, unfortunately, the resize cursor appears when you hover over the edge of the dialog. * qf: minor style fixes - hardcode light theme value for accept button and the spinner so they don't disappear when the theme is dark - make sure the item's color from reference panel is not overriden by a lighter one from another stylesheet --- .../zotero-platform/win/integration.css | 9 ----- .../zotero/integration/insertNoteDialog.xhtml | 5 ++- .../content/zotero/integration/quickFormat.js | 39 +++++++------------ .../zotero/integration/quickFormat.xhtml | 3 +- chrome/skin/default/zotero/integration.css | 16 ++++++-- 5 files changed, 34 insertions(+), 38 deletions(-) diff --git a/chrome/content/zotero-platform/win/integration.css b/chrome/content/zotero-platform/win/integration.css index 5d8dbdf15b..aa820e1fbc 100644 --- a/chrome/content/zotero-platform/win/integration.css +++ b/chrome/content/zotero-platform/win/integration.css @@ -1,5 +1,4 @@ window.citation-dialog { - background: transparent; padding: 0; -moz-appearance: none; } @@ -8,16 +7,8 @@ window.citation-dialog { .citation-dialog.entry { background: -moz-linear-gradient(-90deg, rgb(243,123,119) 0, rgb(180,47,38) 50%, rgb(156,36,27) 50%); padding: 10px; - /* mouse events on win don't fire right at the edge of the window. The dialog has a gap - before the window edges to ensure the window can be dragged from any point of the dialog */ - margin:10px; } .note-dialog .citation-dialog.entry { background: -moz-linear-gradient(-90deg, rgb(249, 231, 179) 0, rgb(228, 193, 94) 50%, rgb(221, 184, 81) 50%); -} - -.citation-dialog.entry:not([square="true"]) { - -moz-border-radius: 15px; - border-radius: 15px; } \ No newline at end of file diff --git a/chrome/content/zotero/integration/insertNoteDialog.xhtml b/chrome/content/zotero/integration/insertNoteDialog.xhtml index 701047092d..6afb798378 100644 --- a/chrome/content/zotero/integration/insertNoteDialog.xhtml +++ b/chrome/content/zotero/integration/insertNoteDialog.xhtml @@ -41,9 +41,12 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" persist="screenX screenY" onkeypress="Zotero_QuickFormat.onWindowKeyPress(event)" - onunload="Zotero_QuickFormat.onUnload()"> + onunload="Zotero_QuickFormat.onUnload()" + drawintitlebar-platforms="linux,win" + no-titlebar-icon="true">