Scaffold: Fix select dialog overflow (again!)

And restore button spacing.
This commit is contained in:
Abe Jellinek 2025-01-24 15:04:43 -05:00
parent ff3ab619d1
commit 9510eef69a
3 changed files with 20 additions and 14 deletions

View file

@ -43,8 +43,8 @@ Zotero_Ingester_Interface_SelectItems.init = function () {
() => Zotero_Ingester_Interface_SelectItems.acceptSelection());
// Set font size from pref
var sbc = document.getElementById('zotero-select-items-container');
Zotero.UIProperties.registerRoot(sbc);
var dialog = document.querySelector('dialog');
Zotero.UIProperties.registerRoot(dialog);
this.io = window.arguments[0];
var listbox = document.getElementById("zotero-selectitems-links");

View file

@ -48,14 +48,10 @@
Services.scriptloader.loadSubScript("chrome://zotero/content/customElements.js", this);
</script>
<vbox id="zotero-select-items-container" flex="1">
<box flex="1">
<richlistbox id="zotero-selectitems-links" flex="1"></richlistbox>
</box>
<hbox id="zotero-select-items-buttons">
<button label="Select All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll()"/>
<button label="Deselect All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll(true)"/>
</hbox>
</vbox>
<richlistbox id="zotero-selectitems-links"></richlistbox>
<hbox id="zotero-select-items-buttons">
<button label="Select All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll()"/>
<button label="Deselect All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll(true)"/>
</hbox>
</dialog>
</window>

View file

@ -29,20 +29,30 @@ $scaffold-toolbarbutton-icons: (
}
};
#scaffold, #zotero-select-item-dialog {
@include contain-richlistbox;
@include macOS-normalize-controls;
}
#scaffold {
min-height: 600px;
@include contain-richlistbox;
}
#zotero-select-item-dialog {
max-width: 400px;
min-height: 330px;
max-height: 330px;
@include contain-richlistbox;
}
// Prevent contain-richlistbox from squishing the buttons
#zotero-selectitems-links {
flex: 1 1 0;
}
#zotero-select-items-buttons {
// Prevent contain-richlistbox from squishing the buttons
flex-shrink: 0;
gap: 6px;
padding-top: 4px;
}
.menubar-container {