From dc948629a70963c30ba3fc6a1e58307a6bbfe746 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Thu, 13 Nov 2025 22:27:13 +0100 Subject: [PATCH] fix history color in dark mode + flip colors of and/or --- src/App/VisualEditor/HistorySVG.tsx | 7 +++++-- src/App/VisualEditor/hooks/useMouse.tsx | 3 ++- src/index.css | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/App/VisualEditor/HistorySVG.tsx b/src/App/VisualEditor/HistorySVG.tsx index f0fccb4..565e9ac 100644 --- a/src/App/VisualEditor/HistorySVG.tsx +++ b/src/App/VisualEditor/HistorySVG.tsx @@ -9,8 +9,10 @@ export const HistorySVG = memo(function HistorySVG(props: {uid: string, topLeft: cx={props.topLeft.x+HISTORY_RADIUS} cy={props.topLeft.y+HISTORY_RADIUS} r={HISTORY_RADIUS} - fill="white" - stroke="black" + style={{ + fill: 'var(--and-state-bg-color)', + stroke: 'var(--rountangle-stroke-color)' + }} strokeWidth={2} data-uid={props.uid} data-parts="history" @@ -20,6 +22,7 @@ export const HistorySVG = memo(function HistorySVG(props: {uid: string, topLeft: y={props.topLeft.y+HISTORY_RADIUS+5} textAnchor="middle" fontWeight={500} + style={{fill: 'var(--rountangle-stroke-color)'}} >{text} void, insertMode: InsertMode, zoo } else { + // @ts-ignore newSelection.push({uid, part}); } } @@ -291,7 +292,7 @@ export function useMouse(makeCheckPoint: () => void, insertMode: InsertMode, zoo } // console.log({newSelection, oldSelection, common}); // return [...oldSelection, ...newSelection]; - return newSelection;xxxxxxxx + return newSelection; }) } } diff --git a/src/index.css b/src/index.css index 67e5114..ac053c8 100644 --- a/src/index.css +++ b/src/index.css @@ -24,8 +24,8 @@ html, body { --modal-backdrop-color: light-dark(rgba(200,200,200,0.7), rgba(23, 22, 32, 0.849)); --status-inactive-color: light-dark(grey, grey); --status-ok-color: light-dark(forestgreen, forestgreen); - --or-state-bg-color: light-dark(#eee, #1a1a1a); - --and-state-bg-color: light-dark(white, rgb(0, 0, 0)); + --or-state-bg-color: light-dark(#eee, #000000); + --and-state-bg-color: light-dark(white, rgb(46, 46, 46)); --rountangle-stroke-color: light-dark(black, #d4d4d4); --active-state-bg-color: light-dark(rgb(255, 240, 214), rgb(53, 37, 18)); --active-state-border-color: light-dark(rgb(205, 133, 0), rgb(235, 124, 21));