Skip to content

Commit

Permalink
Brighten plot points in dark mode (foxglove#6813)
Browse files Browse the repository at this point in the history
**User-Facing Changes**
Brighten plot points in dark mode.

**Description**
Fix the logic to brighten plot points when the dark theme is in use. 

This was inadvertently lost in the performance work in
foxglove#6584.
  • Loading branch information
foxymiles authored and pezy committed Oct 25, 2023
1 parent b76b6a6 commit 99815f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/studio-base/src/panels/Plot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// found at http://www.apache.org/licenses/LICENSE-2.0
// You may not use this file except in compliance with the License.

import { useTheme } from "@mui/material";
import * as _ from "lodash-es";
import { ComponentProps, useCallback, useEffect, useMemo, useState } from "react";

Expand Down Expand Up @@ -204,14 +205,16 @@ function Plot(props: Props) {
return followingView ?? fixedView ?? undefined;
}, [fixedView, followingView]);

const theme = useTheme();

const {
data: plotData,
provider,
getFullData,
} = useDatasets({
startTime: startTime ?? ZERO_TIME,
paths: yAxisPaths,
invertedTheme: false,
invertedTheme: theme.palette.mode === "dark",
xAxisPath,
xAxisVal,
minXValue,
Expand Down

0 comments on commit 99815f5

Please sign in to comment.