diff --git a/chrome/content/zotero/elements/zoteroSearch.js b/chrome/content/zotero/elements/zoteroSearch.js index 9823b6e659..fc3d06e461 100644 --- a/chrome/content/zotero/elements/zoteroSearch.js +++ b/chrome/content/zotero/elements/zoteroSearch.js @@ -441,7 +441,7 @@ indent += '- '; } rows.push({ - name: indent + col.name, + name: indent + Zotero.Utilities.trimInternal(col.name), value: 'C' + col.key, image: Zotero.Collection.prototype.treeViewImage }); @@ -560,7 +560,7 @@ createValueMenu(rows) { let valueMenu = this.querySelector('#valuemenu'); - while (valueMenu.hasChildNodes()){ + while (valueMenu.hasChildNodes()) { valueMenu.removeChild(valueMenu.firstChild); } @@ -573,12 +573,9 @@ } valueMenu.selectedIndex = 0; - if (this.value) - { + if (this.value) { valueMenu.value = this.value; } - - valueMenu.shadowRoot.querySelector('#label-box > image').style.maxHeight = '16px'; } initWithParentAndCondition(parent, condition) { diff --git a/scss/elements/_zoteroSearch.scss b/scss/elements/_zoteroSearch.scss index 3e1eae1f3e..1600b3c501 100644 --- a/scss/elements/_zoteroSearch.scss +++ b/scss/elements/_zoteroSearch.scss @@ -52,6 +52,14 @@ zoterosearch { #operatorsmenu, #valuemenu, #valuefield, .search-in-the-last { width: 12em; } + + #valuemenu::part(icon) { + max-height: 16px; + } + + #valuemenu::part(label), #valuemenu menuitem > .menu-iconic-text { + white-space: pre; + } #condition-tooltips tooltip {