Fix collection tree header alignment on macOS

This commit is contained in:
Adomas Venčkauskas 2021-04-23 11:37:49 +03:00 committed by Dan Stillman
parent 7ec89c44ce
commit efc009f724
2 changed files with 10 additions and 1 deletions

View file

@ -294,8 +294,13 @@ var CollectionTree = class CollectionTree extends LibraryTree {
let twisty; let twisty;
if (this.isContainerEmpty(index)) { if (this.isContainerEmpty(index)) {
twisty = document.createElementNS("http://www.w3.org/1999/xhtml", 'span'); twisty = document.createElementNS("http://www.w3.org/1999/xhtml", 'span');
if (Zotero.isMac && treeRow.isHeader) {
twisty.classList.add("spacer-header");
}
else {
twisty.classList.add("spacer-twisty"); twisty.classList.add("spacer-twisty");
} }
}
else { else {
twisty = getDOMIcon("IconTwisty"); twisty = getDOMIcon("IconTwisty");
twisty.classList.add('twisty'); twisty.classList.add('twisty');

View file

@ -15,6 +15,10 @@
.spacer-twisty { .spacer-twisty {
min-width: 19px; min-width: 19px;
} }
.spacer-header {
min-width: 6px;
}
} }
.virtualized-table-body, .drag-image-container{ .virtualized-table-body, .drag-image-container{