Skip to content

Commit

Permalink
Fix visibility icons in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Mar 30, 2024
1 parent 43f2779 commit 3e41b46
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/viser/client/src/ControlPanel/SceneTreeTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ViewerContext } from "../App";
import { Box, Stack, Tooltip, useMantineTheme } from "@mantine/core";
import { Box, Stack, Tooltip } from "@mantine/core";
import {
IconCaretDown,
IconCaretRight,
Expand Down Expand Up @@ -79,7 +79,6 @@ const SceneTreeTableRow = React.memo(function SceneTreeTableRow(props: {
const isVisibleEffective = isVisible && props.isParentVisible;
const VisibleIcon = isVisible ? IconEye : IconEyeOff;

const theme = useMantineTheme();
return (
<>
<Box
Expand All @@ -103,10 +102,12 @@ const SceneTreeTableRow = React.memo(function SceneTreeTableRow(props: {
<IconCaretRight className={caretIcon} />
)}
</Box>
<Tooltip label="Click to override visibility">
<Tooltip label="Override visibility">
<VisibleIcon
color={theme.colors.gray[isVisibleEffective ? 3 : 6]}
style={{ cursor: "pointer" }}
style={{
cursor: "pointer",
opacity: isVisibleEffective ? 0.85 : 0.25,
}}
onClick={(evt) => {
evt.stopPropagation();
setOverrideVisibility(props.nodeName, !isVisible);
Expand Down

0 comments on commit 3e41b46

Please sign in to comment.