Advanced search: Fix window size issues

- Set minimum dimensions
- Make sure adding/removing conditions only resizes the window
  by the appropriate vertical amount

https://forums.zotero.org/discussion/113523/zotero-7-beta-advanced-search-window-resized-when-pressing
This commit is contained in:
Adomas Venčkauskas 2024-04-10 12:24:39 +03:00
parent b17d1429bf
commit 1811c77f85
4 changed files with 16 additions and 16 deletions

View file

@ -729,8 +729,9 @@
onRemoveClicked() {
if (this.parent){
window.resizeBy(0, -1 * this.getBoundingClientRect().height);
window.dispatchEvent(new CustomEvent('resize'));
this.parent.removeCondition(this.conditionID);
window.sizeToContent()
}
}
@ -744,7 +745,7 @@
)
)
this.parent.addCondition(ref);
window.sizeToContent();
window.resizeBy(0, this.getBoundingClientRect().height);
}
}

View file

@ -141,20 +141,6 @@ label.zotero-text-link {
text-align: center;
}
#zotero-advanced-search-dialog #zotero-search-box-controls {
padding: 3px;
}
#zotero-advanced-search-dialog .virtualized-table-container
{
min-height: 250px;
}
#zotero-advanced-search-dialog #zotero-search-buttons
{
margin: 3px 0;
}
/* Constrain 2x collection/search icons */
zoterosearch .menulist-icon {
height: 16px;

View file

@ -20,6 +20,7 @@
// Components
// --------------------------------------------------
@import "components/advancedSearch";
@import "components/annotation";
@import "components/autosuggest";
@import "components/button";

View file

@ -0,0 +1,12 @@
#zotero-advanced-search-dialog {
min-height: 400px;
min-width: 500px;
#zotero-search-box-controls {
padding: 3px;
}
#zotero-search-buttons {
margin: 3px 0;
}
}