commit a3a9cb9c1ebe92216a2e380b1b4e1c07d2848a34
parent 794b58224413290ecda765d85a42167d23b70211
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 23 Sep 2016 20:15:00 -0400
Fix for too-wide item pane after 4.0 upgrade or prefs reset
Regression from stacked layout mode (6bff554976)
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/itemPane.xul b/chrome/content/zotero/itemPane.xul
@@ -32,7 +32,7 @@
<script src="include.js"/>
<script src="itemPane.js" type="application/javascript;version=1.8"/>
- <vbox id="zotero-item-pane" zotero-persist="width height" flex="1">
+ <vbox id="zotero-item-pane" zotero-persist="width height">
<!-- Trash -->
<hbox id="zotero-item-pane-top-buttons-trash" class="zotero-item-pane-top-buttons" hidden="true">
<button id="zotero-item-restore-button" label="&zotero.items.menu.restoreToLibrary;"
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -4796,7 +4796,10 @@ var ZoteroPane = new function()
itemsToolbar.setAttribute("flex", "0");
itemToolbar.setAttribute("flex", "1");
}
-
+
+ // Allow item pane to shrink to available height in stacked mode, but don't expand to be too
+ // wide when there's no persisted width in non-stacked mode
+ itemPane.setAttribute("flex", stackedLayout ? 1 : 0);
}
/**