commit aa07db50a1c081a3f0ff8fa309c4cee5fe8a2ca0
parent 251da6ce50da37ecabb40f9d03e4ce3fd160af6e
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 31 Dec 2011 16:25:43 +0000
(Hopefully) fix QuickFormat box sizing once and for all
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js
@@ -522,7 +522,6 @@ var Zotero_QuickFormat = new function () {
// add to rich list item
var rll = document.createElement("richlistitem");
rll.setAttribute("orient", "vertical");
- rll.setAttribute("flex", "1");
rll.setAttribute("class", "quick-format-item");
rll.setAttribute("zotero-item", item.cslItemID ? item.cslItemID : item.id);
rll.appendChild(titleNode);
@@ -545,7 +544,6 @@ var Zotero_QuickFormat = new function () {
// add to rich list item
var rll = document.createElement("richlistitem");
rll.setAttribute("orient", "vertical");
- rll.setAttribute("flex", "1");
rll.setAttribute("disabled", true);
rll.setAttribute("class", loading ? "quick-format-loading" : "quick-format-separator");
rll.appendChild(titleNode);
@@ -718,6 +716,7 @@ var Zotero_QuickFormat = new function () {
null, false, false, null);
panelShowing = true;
referenceHeight = firstReference.scrollHeight;
+ if(firstReference === referenceBox.lastChild) referenceHeight += 1;
}
if(!separatorHeight && firstSeparator) {
@@ -725,10 +724,11 @@ var Zotero_QuickFormat = new function () {
null, false, false, null);
panelShowing = true;
separatorHeight = firstSeparator.scrollHeight;
+ if(firstSeparator === referenceBox.lastChild) separatorHeight += 1;
}
referencePanel.sizeTo(window.outerWidth-30,
- numReferences*referenceHeight+1+numSeparators*separatorHeight);
+ numReferences*referenceHeight+1+numSeparators*separatorHeight-1);
if(!panelShowing) referencePanel.openPopup(document.documentElement, "after_start", 15,
null, false, false, null);
} else if(panelShowing) {
diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul
@@ -66,7 +66,7 @@
</deck>
</windowdragbox>
<panel id="quick-format-reference-panel" noautofocus="true" norestorefocus="true" noautohide="true" height="0">
- <richlistbox id="quick-format-reference-list"/>
+ <richlistbox id="quick-format-reference-list" flex="1"/>
</panel>
<panel id="citation-properties" type="arrow" orient="vertical"
onkeypress="Zotero_QuickFormat.onPanelKeyPress(event)"