From a6b3dbc8949e6fc6a0804b6fb984136096e1cdcc Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 12 Oct 2021 23:02:14 -0700 Subject: [PATCH] fix: Reduce sensitivity of dark icon switching fix: Layout issue in icon picker in dark mode closes #2658 --- app/components/CollectionIcon.js | 2 +- app/components/ContextMenu/index.js | 2 -- shared/theme.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/components/CollectionIcon.js b/app/components/CollectionIcon.js index 87e7a3b2..54bc45e2 100644 --- a/app/components/CollectionIcon.js +++ b/app/components/CollectionIcon.js @@ -20,7 +20,7 @@ function ResolvedCollectionIcon({ collection, expanded, size }: Props) { // otherwise it will be impossible to see against the dark background. const color = ui.resolvedTheme === "dark" && collection.color !== "currentColor" - ? getLuminance(collection.color) > 0.12 + ? getLuminance(collection.color) > 0.09 ? collection.color : "currentColor" : collection.color; diff --git a/app/components/ContextMenu/index.js b/app/components/ContextMenu/index.js index cb6cae86..ba3be5e2 100644 --- a/app/components/ContextMenu/index.js +++ b/app/components/ContextMenu/index.js @@ -140,7 +140,5 @@ export const Background = styled.div` max-width: 276px; background: ${(props) => props.theme.menuBackground}; box-shadow: ${(props) => props.theme.menuShadow}; - border: ${(props) => - props.theme.menuBorder ? `1px solid ${props.theme.menuBorder}` : "none"}; `}; `; diff --git a/shared/theme.js b/shared/theme.js index 1f636288..5dd986ad 100644 --- a/shared/theme.js +++ b/shared/theme.js @@ -209,7 +209,7 @@ export const dark = { menuBorder: lighten(0.1, colors.almostBlack), menuBackground: lighten(0.015, colors.almostBlack), menuShadow: - "0 0 0 1px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.08), inset 0 0 1px rgba(255,255,255,.2)", + "0 0 0 1px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.08), inset 0 0 1px rgba(255,255,255,.4)", divider: lighten(0.1, colors.almostBlack), titleBarDivider: darken(0.4, colors.slate), inputBorder: colors.slateDark,