From 001ed4f0d27ef3c5ba2bb2619d98fac0ca94ce78 Mon Sep 17 00:00:00 2001 From: Tim deBoer Date: Thu, 23 May 2024 13:07:45 -0400 Subject: [PATCH] chore: edge and light mode for modal dialog (#7246) Adds light mode colors for Modal dialog along with a defined 1px border so that it is not washed out. Initial light mode color values are taken from other mappings in the registry. Also fixes a nit: the background should have the default cursor and not a button cursor. Fixes #7187. First minor part of #7184. Signed-off-by: Tim deBoer --- packages/main/src/plugin/color-registry.ts | 19 +++++++++++++++++++ packages/ui/src/lib/modal/Modal.svelte | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/main/src/plugin/color-registry.ts b/packages/main/src/plugin/color-registry.ts index 67c0411317cff..b3ed4403403e0 100644 --- a/packages/main/src/plugin/color-registry.ts +++ b/packages/main/src/plugin/color-registry.ts @@ -236,6 +236,7 @@ export class ColorRegistry { this.initTable(); this.initDetails(); this.initTab(); + this.initModal(); } protected initGlobalNav(): void { @@ -774,4 +775,22 @@ export class ColorRegistry { light: colorPalette.purple[500], }); } + + // modal dialog + protected initModal(): void { + const modal = 'modal-'; + + this.registerColor(`${modal}fade`, { + dark: colorPalette.black, + light: colorPalette.white, + }); + this.registerColor(`${modal}bg`, { + dark: colorPalette.charcoal[800], + light: colorPalette.gray[300], + }); + this.registerColor(`${modal}border`, { + dark: colorPalette.charcoal[500], + light: colorPalette.gray[200], + }); + } } diff --git a/packages/ui/src/lib/modal/Modal.svelte b/packages/ui/src/lib/modal/Modal.svelte index 44ddea3a5170d..4ec255b77cf35 100644 --- a/packages/ui/src/lib/modal/Modal.svelte +++ b/packages/ui/src/lib/modal/Modal.svelte @@ -35,12 +35,12 @@ if (previously_focused) {