From 82a9aee21c5cc0c0cc2432428670761b82113b0a Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:44:08 +0800 Subject: [PATCH] Unify item tree & v-table style on Windows & Linux --- scss/components/_item-tree.scss | 4 +-- scss/components/_virtualized-table.scss | 29 +++++++++++++++-- scss/linux/_item-tree.scss | 5 --- scss/linux/_virtualized-table.scss | 42 ------------------------- scss/mac/_virtualized-table.scss | 22 ------------- scss/win/_item-tree.scss | 34 -------------------- scss/zotero-mac.scss | 1 - scss/zotero-unix.scss | 2 -- scss/zotero-win.scss | 2 -- 9 files changed, 29 insertions(+), 112 deletions(-) delete mode 100644 scss/linux/_item-tree.scss delete mode 100644 scss/linux/_virtualized-table.scss delete mode 100644 scss/mac/_virtualized-table.scss delete mode 100644 scss/win/_item-tree.scss diff --git a/scss/components/_item-tree.scss b/scss/components/_item-tree.scss index f9635fef75..fe450e6ec6 100644 --- a/scss/components/_item-tree.scss +++ b/scss/components/_item-tree.scss @@ -14,11 +14,11 @@ .virtualized-table { .row { &.odd:not(.selected) { - background-color: -moz-oddtreerow; + background-color: var(--material-background); } &.even:not(.selected) { - background-color: -moz-eventreerow; + background-color: var(--material-sidepane); } &.selected { diff --git a/scss/components/_virtualized-table.scss b/scss/components/_virtualized-table.scss index b5658fd7cf..786dd6bac5 100644 --- a/scss/components/_virtualized-table.scss +++ b/scss/components/_virtualized-table.scss @@ -130,8 +130,8 @@ } &.selected:not(.highlighted) { - background-color: SelectedItem; - color: SelectedItemText; + background-color: var(--accent-blue); + color: #fff; @include state(".virtualized-table:not(:focus)") { color: var(--fill-primary); @@ -194,6 +194,27 @@ width: 2px; background-color: #ccc; } + + .twisty { + width: 19px; + + svg { + fill: #888; + width: 16px; + } + } + + .selected:not(.highlighted) .twisty svg { + fill: #fff; + } + + .spacer-twisty { + min-width: 19px; + } + + .spacer-header { + min-width: 6px; + } } .virtualized-table-header { @@ -342,3 +363,7 @@ transform: rotate(90deg); } } + +.virtualized-table, .drag-image-container { + +} diff --git a/scss/linux/_item-tree.scss b/scss/linux/_item-tree.scss deleted file mode 100644 index 36d96d4ee8..0000000000 --- a/scss/linux/_item-tree.scss +++ /dev/null @@ -1,5 +0,0 @@ -#zotero-items-tree { - .cell.hasAttachment, .cell.numNotes { - padding: 0 8px; - } -} \ No newline at end of file diff --git a/scss/linux/_virtualized-table.scss b/scss/linux/_virtualized-table.scss deleted file mode 100644 index 968698b75b..0000000000 --- a/scss/linux/_virtualized-table.scss +++ /dev/null @@ -1,42 +0,0 @@ -.virtualized-table { - border: 1px solid ThreeDShadow; -} -.virtualized-table, .drag-image-container { - .twisty { - padding-inline-end: 3px; - svg { - width: 10px; - } - } -} -.virtualized-table-header { - background-image: linear-gradient(-moz-field, -moz-dialog 120%); - border-bottom: 1px solid ThreeDShadow; - border-inline-end: 1px solid ThreeDShadow; - - .cell { - &:hover { - background: -moz-field; - } - - &.dragging { - background: -moz-dialog; - } - - .resizer { - background: linear-gradient(ThreeDShadow, ThreeDShadow) no-repeat center/1px 80%; - } - - .sort-indicator { - transform: scale(1.25); - - &.ascending { - transform: scale(1.25) rotate(180deg); - } - } - } -} - -.twisty svg { - fill: WindowText; -} diff --git a/scss/mac/_virtualized-table.scss b/scss/mac/_virtualized-table.scss deleted file mode 100644 index ef1dd300eb..0000000000 --- a/scss/mac/_virtualized-table.scss +++ /dev/null @@ -1,22 +0,0 @@ -.virtualized-table, .drag-image-container { - .twisty { - width: 19px; - - svg { - fill: #888; - width: 16px; - } - } - - .selected:not(.highlighted) .twisty svg { - fill: #fff; - } - - .spacer-twisty { - min-width: 19px; - } - - .spacer-header { - min-width: 6px; - } -} diff --git a/scss/win/_item-tree.scss b/scss/win/_item-tree.scss deleted file mode 100644 index e53b761411..0000000000 --- a/scss/win/_item-tree.scss +++ /dev/null @@ -1,34 +0,0 @@ -#zotero-items-tree .virtualized-table { - .row { - padding-inline-end: 1px; - &.selected { - background-color: #e5f3ff; - color: inherit; - padding-inline-start: 2px; - padding-inline-end: 0; - } - &:hover { - background-color: #e5f3ff; - } - } -} - -#zotero-items-tree .virtualized-table:not(:focus) { - .row { - &.selected { - color: inherit; - background: #f0f0f0; - border: none; - } - &.selected:hover { - background-color: #e5f3ff; - padding-inline-start: 2px; - padding-inline-end: 0; - } - } -} - -.virtualized-table.multi-select:focus .row.focused { - padding-inline-start: 2px; - width: calc(100% - 5px); -} diff --git a/scss/zotero-mac.scss b/scss/zotero-mac.scss index 49b108e7b8..9b53495945 100644 --- a/scss/zotero-mac.scss +++ b/scss/zotero-mac.scss @@ -11,7 +11,6 @@ @import "mac/search"; @import "mac/tabBar"; @import "mac/tag-selector"; -@import "mac/virtualized-table"; // Elements diff --git a/scss/zotero-unix.scss b/scss/zotero-unix.scss index 86840983bc..3e40a7c60c 100644 --- a/scss/zotero-unix.scss +++ b/scss/zotero-unix.scss @@ -9,14 +9,12 @@ @import "linux/editable"; @import "linux/errorReport"; @import "linux/feedSettings"; -@import "linux/item-tree"; @import "linux/menupopup"; @import "linux/search"; @import "linux/tabBar"; @import "linux/titleBar"; @import "linux/tagsBox"; @import "linux/tagSelector"; -@import "linux/virtualized-table"; // Elements diff --git a/scss/zotero-win.scss b/scss/zotero-win.scss index bd71bc50b1..0faedfa685 100644 --- a/scss/zotero-win.scss +++ b/scss/zotero-win.scss @@ -10,8 +10,6 @@ @import "win/titleBar"; @import "win/menupopup"; @import "win/tag-selector"; -@import "win/item-tree"; -@import "win/virtualized-table"; // Elements