From 8844f44ecc2e1229f27b5237e991be50c1f4ee94 Mon Sep 17 00:00:00 2001 From: Paul Nasdalack Date: Sat, 28 Oct 2023 22:02:35 +0200 Subject: [PATCH] support for vscode themes --- icons/copyLine.svg | 11 +--- icons/newFile.svg | 4 +- icons/newGrid.svg | 2 +- icons/newLineLink.svg | 14 ++--- icons/newList.svg | 25 +++++---- src/svelte/App.svelte | 20 ++++--- src/svelte/Depot/Depot.svelte | 76 +++++++++++++++----------- src/svelte/Depot/DepotSheet.svelte | 7 ++- src/svelte/Fields/LongTextField.svelte | 8 +-- src/svelte/Fields/NumberField.svelte | 8 +-- src/svelte/Fields/TextField.svelte | 8 +-- 11 files changed, 96 insertions(+), 87 deletions(-) diff --git a/icons/copyLine.svg b/icons/copyLine.svg index 57ae847..1af7437 100644 --- a/icons/copyLine.svg +++ b/icons/copyLine.svg @@ -1,11 +1,6 @@ - - - + + + - - - - - diff --git a/icons/newFile.svg b/icons/newFile.svg index 7984503..56d99d2 100644 --- a/icons/newFile.svg +++ b/icons/newFile.svg @@ -1,4 +1,4 @@ - - + + diff --git a/icons/newGrid.svg b/icons/newGrid.svg index f4d2882..88f7482 100644 --- a/icons/newGrid.svg +++ b/icons/newGrid.svg @@ -1,5 +1,5 @@ - + diff --git a/icons/newLineLink.svg b/icons/newLineLink.svg index 0a09b52..ef3eb61 100644 --- a/icons/newLineLink.svg +++ b/icons/newLineLink.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/icons/newList.svg b/icons/newList.svg index a6afd4a..37ee6a8 100644 --- a/icons/newList.svg +++ b/icons/newList.svg @@ -1,12 +1,17 @@ - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/src/svelte/App.svelte b/src/svelte/App.svelte index 7b56e31..01a735d 100644 --- a/src/svelte/App.svelte +++ b/src/svelte/App.svelte @@ -164,20 +164,20 @@ limitations under the License. /* Table Stuff */ :global(table) { - /* border: 2px solid #252526; */ + /* background-color: var(--vscode-tab-inactiveBackground); */ width: 100%; text-align: left; border-collapse: collapse; + background: var(--vscode-editor-background); } :global(table td) { - border:3px solid #252526; - padding: 0px; + border-right: 1px solid var(--vscode-panel-border); + border-left: 1px solid var(--vscode-panel-border); + padding: 0px 3px; /* width: 50% */ } - :global(table td) { - border:3px solid #252526; - padding: 0px; - /* width: 50% */ + :global(table tr:nth-child(even)) { + background-color: var(--vscode-tree-tableOddRowsBackground); } :global(table tbody td) { font-size: 13px; @@ -187,10 +187,14 @@ limitations under the License. padding: 5px; } :global(table th) { - background: #252526; + border-right: 1px solid var(--vscode-panel-border); + border-left: 1px solid var(--vscode-panel-border); + background: var(--vscode-editor-background); font-size: 13px; font-weight: bold; text-align: left; + position: sticky; + top: 0; } \ No newline at end of file diff --git a/src/svelte/Depot/Depot.svelte b/src/svelte/Depot/Depot.svelte index f954c37..8b81ea9 100644 --- a/src/svelte/Depot/Depot.svelte +++ b/src/svelte/Depot/Depot.svelte @@ -781,31 +781,33 @@ function selectedSheetEdit() { {/if} {/each} {/if} -
- {#each data.sheets as sheet} - {#if !sheet.hidden} - +
+
+ {#each data.sheets as sheet} + {#if !sheet.hidden} + + {/if} + {/each} +
+ + {#if !editorConfig.active} + + {/if} - {/each}
- - {#if !editorConfig.active} - - - {/if} {/if} {/if} @@ -816,16 +818,20 @@ function selectedSheetEdit() { {/if} diff --git a/src/svelte/Fields/NumberField.svelte b/src/svelte/Fields/NumberField.svelte index a9072c1..6fc4f81 100644 --- a/src/svelte/Fields/NumberField.svelte +++ b/src/svelte/Fields/NumberField.svelte @@ -12,13 +12,11 @@ export let max; box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; - border: 0px; font-size: 13px; - border-width: 0px; - background-color: #3c3c3c; - color: #f0f0f0; + border: 1px solid var(--vscode-input-border); + background-color: var(--vscode-input-background); + color: var(--vscode-input-foreground); width: 100%; height: 100%; - box-sizing: border-box; } \ No newline at end of file diff --git a/src/svelte/Fields/TextField.svelte b/src/svelte/Fields/TextField.svelte index 1b70279..7f282f7 100644 --- a/src/svelte/Fields/TextField.svelte +++ b/src/svelte/Fields/TextField.svelte @@ -22,13 +22,11 @@ box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; - border: 0px; font-size: 13px; - border-width: 0px; - background-color: #3c3c3c; - color: #f0f0f0; + border: 1px solid var(--vscode-input-border); + background-color: var(--vscode-input-background); + color: var(--vscode-input-foreground); width: 100%; height: 100%; - box-sizing: border-box; } \ No newline at end of file