From 6b4dd2a5def93bb6605c6900e482688bb2dd79ce Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 9 Nov 2022 18:17:00 -0500 Subject: [PATCH] Update search match highlight and occurrence style --- styles/src/styleTree/editor.ts | 8 ++++---- styles/src/styleTree/search.ts | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/styles/src/styleTree/editor.ts b/styles/src/styleTree/editor.ts index 8d03a87085b9fbbc9fcf4ad3900be9e03c443579..63d86c8f471f3574e87cb05414c75e5a39c33c04 100644 --- a/styles/src/styleTree/editor.ts +++ b/styles/src/styleTree/editor.ts @@ -152,10 +152,10 @@ export default function editor(colorScheme: ColorScheme) { widthEm: 0.16, cornerRadius: 0.05, }, - documentHighlightReadBackground: colorScheme.ramps - .neutral(0.5) - .alpha(0.2) - .hex(), // TODO: This was blend + /** Highlights matching occurences of what is under the cursor + * as well as matched brackets + */ + documentHighlightReadBackground: withOpacity(foreground(layer, "accent"), 0.1), documentHighlightWriteBackground: colorScheme.ramps .neutral(0.5) .alpha(0.4) diff --git a/styles/src/styleTree/search.ts b/styles/src/styleTree/search.ts index b494c237cccf2b3c365241f2284513f9eba4ee22..4f12c42c0c267e2ec98578ae46955f915ed9f974 100644 --- a/styles/src/styleTree/search.ts +++ b/styles/src/styleTree/search.ts @@ -1,5 +1,6 @@ import { ColorScheme } from "../themes/common/colorScheme"; -import { background, border, text } from "./components"; +import { withOpacity } from "../utils/color"; +import { background, border, foreground, text } from "./components"; export default function search(colorScheme: ColorScheme) { let layer = colorScheme.highest; @@ -26,7 +27,8 @@ export default function search(colorScheme: ColorScheme) { }; return { - matchBackground: background(layer), // theme.editor.highlight.match, + // TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive + matchBackground: withOpacity(foreground(layer, "accent"), 0.4), tabIconSpacing: 8, tabIconWidth: 14, optionButton: {