Skip to content

Commit 642a091

Browse files
authored
Merge pull request #92 from OpenFUSIONToolkit/bugfix/rotating-cursor-theme
fix(gui): theme the rotating time cursor (it rendered black)
2 parents 8dc2b26 + ffba304 commit 642a091

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

gui/web/src/components/tabs/RotatingTab.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,11 @@ export default function RotatingTab({ machine }: { machine: string }) {
799799
x1: cursorMs,
800800
y1: 1,
801801
line: {
802-
color: "var(--accent)", // bright turquoise
802+
// Plotly writes this straight into the SVG `stroke`, which does NOT
803+
// resolve CSS custom properties — "var(--accent)" was invalid there and
804+
// fell back to black, leaving the cursor near-invisible in dark mode.
805+
// Use the literal --accent value for each theme.
806+
color: dark ? "#2ee6cf" : "#0a8d80",
803807
width: 2,
804808
dash: "dash" as const,
805809
},
@@ -848,7 +852,7 @@ export default function RotatingTab({ machine }: { machine: string }) {
848852
mode: "lines" as const,
849853
x: freqs,
850854
y: coh,
851-
line: { color: "var(--good)", width: 1.5 },
855+
line: { color: dark ? "#54e08a" : "#1f9d57", width: 1.5 }, // --good, literal (see above)
852856
name: "Coherence",
853857
xaxis: "x",
854858
yaxis: "y",
@@ -872,7 +876,7 @@ export default function RotatingTab({ machine }: { machine: string }) {
872876
mode: "lines" as const,
873877
x: freqs,
874878
y: power,
875-
line: { color: "var(--accent)", width: 1.5 },
879+
line: { color: dark ? "#2ee6cf" : "#0a8d80", width: 1.5 }, // --accent, literal (see above)
876880
name: "Cross-Power",
877881
xaxis: "x",
878882
yaxis: "y3",

0 commit comments

Comments
 (0)