Compare commits

..

No commits in common. "910d2df7b53ec9fd8ffdee2a68138a9091b62a9b" and "48bf5299c1609d19ede1c3f143954ca421f2af6c" have entirely different histories.

3 changed files with 6 additions and 8 deletions

View File

@ -301,9 +301,10 @@
grid-template-rows: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
} }
.left { .left {
display: grid; display: flex;
grid-template-rows: minmax(0, 1fr) auto; flex-direction: column;
overflow: hidden; align-items: stretch;
justify-content: space-between;
} }
.toolbar { .toolbar {
display: flex; display: flex;

View File

@ -1,6 +1,6 @@
<script lang='ts'> <script lang='ts'>
import { Button } from "carbon-components-svelte"; import { Button } from "carbon-components-svelte";
import { AddLarge, ColorSwitch } from "carbon-icons-svelte"; import { Add, ColorSwitch } from "carbon-icons-svelte";
import { ReplaceSwatchUndoable, type LoadedFile, AddSwatchUndoable } from "../types/file"; import { ReplaceSwatchUndoable, type LoadedFile, AddSwatchUndoable } from "../types/file";
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";
@ -22,13 +22,11 @@
function addSwatch() { function addSwatch() {
file.push(new AddSwatchUndoable(red, green, blue, alpha)) file.push(new AddSwatchUndoable(red, green, blue, alpha))
dispatch('refresh', {}) dispatch('refresh', {})
;(document.activeElement as HTMLElement).blur()
} }
function replaceSwatch() { function replaceSwatch() {
file.push(new ReplaceSwatchUndoable(index, red, green, blue, alpha)) file.push(new ReplaceSwatchUndoable(index, red, green, blue, alpha))
dispatch('refresh', {}) dispatch('refresh', {})
;(document.activeElement as HTMLElement).blur()
} }
</script> </script>
@ -37,7 +35,7 @@
<div class="label" style="color: rgb({255-red}, {255-green}, {255-blue})">{index}</div> <div class="label" style="color: rgb({255-red}, {255-green}, {255-blue})">{index}</div>
</div> </div>
<Button kind="ghost" size="small" disabled={swatchExists} iconDescription="replace swatch" tooltipPosition="top" icon={ColorSwitch} on:click={replaceSwatch}></Button> <Button kind="ghost" size="small" disabled={swatchExists} iconDescription="replace swatch" tooltipPosition="top" icon={ColorSwitch} on:click={replaceSwatch}></Button>
<Button kind="ghost" size="small" disabled={swatchExists} iconDescription="add swatch" tooltipPosition="top" icon={AddLarge} on:click={addSwatch}></Button> <Button kind="ghost" size="small" disabled={swatchExists} iconDescription="add swatch" tooltipPosition="top" icon={Add} on:click={addSwatch}></Button>
</main> </main>
<style> <style>

View File

@ -142,7 +142,6 @@
background-color: var(--cds-background-selected); background-color: var(--cds-background-selected);
text-align: left; text-align: left;
user-select: none; user-select: none;
overflow: auto;
} }
.entry { .entry {
position: relative; position: relative;