From f5b2f77a3a51e8931a946b920e831e2c9515f010 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 9 Apr 2009 05:28:41 +0000 Subject: [PATCH] hide toolbars when Zotero is in fullscreen mode. this doesn't look quite right on OS X, but I can't figure out how to fix it. --- chrome/content/zotero/overlay.js | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index d6ba521bb..10d99bbb6 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -90,6 +90,7 @@ var ZoteroPane = new function() const COLLECTIONS_HEIGHT = 125; // minimum height of the collections pane and toolbar var self = this; + var titlebarcolorState, collapseState, titleState; /* * Called when the window is open @@ -388,6 +389,39 @@ var ZoteroPane = new function() document.getElementById('content').setAttribute('collapsed', makeFullScreen); document.getElementById('zotero-splitter').setAttribute('hidden', makeFullScreen); fs.setAttribute('fullscreenmode', makeFullScreen); + + // hide or show navigation toolbars + var toolbox = getNavToolbox(); + if(makeFullScreen) { + titleState = document.title; + document.title = "Zotero"; + + // the below would be a good thing to do if the whole title bar (and not just the center + // part) got updated when it happened... + /*if(Zotero.isMac) { + titlebarcolorState = document.documentElement.getAttribute("activetitlebarcolor"); + document.documentElement.removeAttribute("activetitlebarcolor"); + }*/ + if(Zotero.isMac) document.getElementById("zotero-pane").style.borderTop = "1px solid black"; + + collapseState = [node.collapsed for each (node in toolbox.childNodes)]; + for(var i=0; i