From 3698d88df0943b6451a820c124917ed349d637de Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Mon, 28 Aug 2023 11:16:25 +0200 Subject: [PATCH] Clean up close icon (#1825) We use a "close" (X) icon in toasts and in the dapps explorer. The previous cross was pretty much an upper case X, which looked a bit odd. The scaling & the animating was inconsistent. This replaces the base icon with a proper cross and makes the proportions & animations a bit nicer. --- src/frontend/src/components/icons.ts | 41 ++++++++++++++++++---------- src/frontend/src/styles/main.css | 24 ++++++++++------ 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/frontend/src/components/icons.ts b/src/frontend/src/components/icons.ts index 89535ba281..ac19578e0c 100644 --- a/src/frontend/src/components/icons.ts +++ b/src/frontend/src/components/icons.ts @@ -97,21 +97,32 @@ export const icLogo = html` `; -export const closeIcon = html` - - - -`; +export const closeIcon = (() => { + // Draw a cross the size of the inscribed circle (for dimensions 16x16) + // (we avoid drawing from 0 to 16 because we need some padding for the stroke width) + + // 8*(1 - Math.cos(Math.PI/4)); + const small = "2.3431457505076194"; + // 8*(1 + Math.cos(Math.PI/4)); + const big = "13.65685424949238"; + + return html` + + + + `; +})(); export const warningIcon = html`