From cf241447ab5ed4b8754f8db43023ad761546fb90 Mon Sep 17 00:00:00 2001 From: yexingsha Date: Thu, 11 Jan 2024 23:20:34 -0600 Subject: [PATCH] fixed some spacing in collectionTree and itemTree --- chrome/content/zotero/collectionTree.jsx | 2 +- chrome/content/zotero/itemTree.jsx | 2 +- scss/components/_collection-tree.scss | 4 ++-- scss/components/_item-tree.scss | 2 +- scss/components/_virtualized-table.scss | 9 +++++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/collectionTree.jsx b/chrome/content/zotero/collectionTree.jsx index de183dedf0..3116aee434 100644 --- a/chrome/content/zotero/collectionTree.jsx +++ b/chrome/content/zotero/collectionTree.jsx @@ -32,7 +32,7 @@ const { getCSSIcon } = require('components/icons'); const { getDragTargetOrient } = require('components/utils'); const { Cc, Ci, Cu } = require('chrome'); -const CHILD_INDENT = 15; +const CHILD_INDENT = 16; var CollectionTree = class CollectionTree extends LibraryTree { static async init(domEl, opts) { diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 71fd3e5bf0..91575c370f 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -40,7 +40,7 @@ Cu.import("resource://gre/modules/osfile.jsm"); * @typedef {import("./itemTreeColumns.jsx").ItemTreeColumnOptions} ItemTreeColumnOptions */ -const CHILD_INDENT = 12; +const CHILD_INDENT = 16; const COLORED_TAGS_RE = new RegExp("^(?:Numpad|Digit)([0-" + Zotero.Tags.MAX_COLORED_TAGS + "]{1})$"); const COLUMN_PREFS_FILEPATH = OS.Path.join(Zotero.Profile.dir, "treePrefs.json"); const ATTACHMENT_STATE_LOAD_DELAY = 150; //ms diff --git a/scss/components/_collection-tree.scss b/scss/components/_collection-tree.scss index 084ba1126d..d697ecb471 100644 --- a/scss/components/_collection-tree.scss +++ b/scss/components/_collection-tree.scss @@ -41,7 +41,7 @@ $icons: ( } .virtualized-table-body { - padding: 0 8px; + padding: 0 8px 8px; } .cell.primary { @@ -56,7 +56,7 @@ $icons: ( flex-shrink: 1; text-overflow: ellipsis; overflow: hidden; - margin-left: 6px; + margin-left: 4px; } input.cell-text { diff --git a/scss/components/_item-tree.scss b/scss/components/_item-tree.scss index b4a52fb329..34ea5af0b5 100644 --- a/scss/components/_item-tree.scss +++ b/scss/components/_item-tree.scss @@ -3,7 +3,7 @@ #zotero-items-tree { .virtualized-table-body, .drag-image-container { - padding: 4px 8px; + padding: 4px 8px 8px; } .virtualized-table-header { diff --git a/scss/components/_virtualized-table.scss b/scss/components/_virtualized-table.scss index f10f0ccf8c..e3e39d6ee8 100644 --- a/scss/components/_virtualized-table.scss +++ b/scss/components/_virtualized-table.scss @@ -47,6 +47,11 @@ flex-grow: 1; box-sizing: border-box; + &.label { + padding-inline-end: 4px; + } + + &.label, &.first-column { padding-inline-start: 0; } @@ -66,7 +71,7 @@ overflow: hidden; &:not(:first-child) { - margin-inline-start: 5px; + margin-inline-start: 4px; } } @@ -205,7 +210,7 @@ } .spacer-header { - min-width: 6px; + min-width: 0px; } }