@@ -7,32 +7,66 @@ import IconButton from '@material-ui/core/IconButton';
77import TreeItem from '@material-ui/lab/TreeItem' ;
88import Visibility from '@material-ui/icons/Visibility' ;
99import VisibilityOff from '@material-ui/icons/VisibilityOff' ;
10- import ColorLens from '@material-ui/icons/ColorLens' ;
11- import Shuffle from '@material-ui/icons/Shuffle' ;
1210import { ChromePicker } from 'react-color' ;
1311import { useDispatch , useSelector } from 'react-redux' ;
14- import { experimentLabelColor } from '../../theme' ;
12+ import {
13+ experimentLabelColor ,
14+ bgDarker ,
15+ bgLight ,
16+ radius ,
17+ } from '../../theme' ;
18+ import { RandomColorLensIcon , ColorLensIcon , TriangleIcon } from './NetPyNEIcons' ;
1519import { changeInstanceColor } from '../../redux/actions/general' ;
1620
1721const useStyles = makeStyles ( ( theme ) => ( {
1822 networkItem : {
1923 paddingTop : '2px' ,
2024 paddingBottom : '2px' ,
25+ paddingLeft : '8px' ,
26+ paddingRight : '8px' ,
27+ borderRadius : radius ,
28+ '&:hover' : {
29+ backgroundColor : '#333333' ,
30+ } ,
2131 } ,
2232 controls : {
2333 '& .MuiIconButton-root' : {
24- padding : 0 ,
34+ padding : '0 !important' ,
2535 marginLeft : '0.5rem' ,
2636 color : experimentLabelColor ,
2737 '&:hover' : {
2838 color : 'white' ,
2939 } ,
3040 } ,
3141 } ,
42+ colorPickerBox : {
43+ position : 'absolute' ,
44+ top : '1rem' ,
45+ } ,
46+ triangleIcon : {
47+ marginBottom : '-7px' ,
48+ color : bgDarker ,
49+ } ,
3250 colorPicker : {
3351 position : 'absolute' ,
3452 zIndex : 1000 ,
3553 right : 0 ,
54+ backgroundColor : `${ bgDarker } !important` ,
55+ padding : '0.2rem' ,
56+ '& label' : {
57+ color : '#ffffff !important' ,
58+ } ,
59+ '& input' : {
60+ backgroundColor : `${ bgLight } !important` ,
61+ color : '#ffffff !important' ,
62+ boxShadow : 'none !important' ,
63+ } ,
64+ '& svg' : {
65+ fill : '#ffffff !important' ,
66+ } ,
67+ '& svg:hover' : {
68+ background : 'transparent !important' ,
69+ } ,
3670 } ,
3771} ) ) ;
3872
@@ -153,14 +187,18 @@ const ControlPanelTreeItem = (props) => {
153187 < IconButton onClick = { ( event ) => changeVisibility ( event , nodeId ) } >
154188 { visibility ? < Visibility /> : < VisibilityOff /> }
155189 </ IconButton >
156- < IconButton onClick = { ( event ) => generateRandomColor ( event , nodeId ) } > < Shuffle /> </ IconButton >
157- < IconButton onClick = { ( ) => setShowColorPicker ( true ) } > < ColorLens /> </ IconButton >
190+ < IconButton onClick = { ( event ) => generateRandomColor ( event , nodeId ) } >
191+ < RandomColorLensIcon />
192+ </ IconButton >
193+ < IconButton onClick = { ( ) => setShowColorPicker ( true ) } > < ColorLensIcon /> </ IconButton >
158194 {
159195 showColorPicker
160196 ? (
161197 < Box
198+ className = { classes . colorPickerBox }
162199 onMouseLeave = { ( ) => setShowColorPicker ( false ) }
163200 >
201+ < TriangleIcon className = { classes . triangleIcon } />
164202 < ChromePicker
165203 className = { classes . colorPicker }
166204 color = { color }
0 commit comments