@@ -13,9 +13,9 @@ import { ErrorBoundary } from '../react-common/errorBoundary';
1313import { getLocString } from '../react-common/locReactSide' ;
1414import { IMessageHandler , PostOffice } from '../react-common/postOffice' ;
1515import { Progress } from '../react-common/progress' ;
16- import { RelativeImage } from '../react-common/relativeImage' ;
1716import { Cell , ICellViewModel } from './cell' ;
1817import { CellButton } from './cellButton' ;
18+ import { Image , ImageName } from './image' ;
1919import { createCellVM , generateTestState , IMainPanelState } from './mainPanelState' ;
2020import { MenuBar } from './menuBar' ;
2121
@@ -53,23 +53,6 @@ export class MainPanel extends React.Component<IMainPanelProps, IMainPanelState>
5353
5454 public render ( ) {
5555
56- const clearButtonImage = this . props . theme !== 'vscode-dark' ? './images/Cancel/Cancel_16xMD_vscode.svg' :
57- './images/Cancel/Cancel_16xMD_vscode_dark.svg' ;
58- const redoImage = this . props . theme !== 'vscode-dark' ? './images/Redo/Redo_16x_vscode.svg' :
59- './images/Redo/Redo_16x_vscode_dark.svg' ;
60- const undoImage = this . props . theme !== 'vscode-dark' ? './images/Undo/Undo_16x_vscode.svg' :
61- './images/Undo/Undo_16x_vscode_dark.svg' ;
62- const restartImage = this . props . theme !== 'vscode-dark' ? './images/Restart/Restart_grey_16x_vscode.svg' :
63- './images/Restart/Restart_grey_16x_vscode_dark.svg' ;
64- const saveAsImage = this . props . theme !== 'vscode-dark' ? './images/SaveAs/SaveAs_16x_vscode.svg' :
65- './images/SaveAs/SaveAs_16x_vscode_dark.svg' ;
66- const collapseAllImage = this . props . theme !== 'vscode-dark' ? './images/CollapseAll/CollapseAll_16x_vscode.svg' :
67- './images/CollapseAll/CollapseAll_16x_vscode_dark.svg' ;
68- const expandAllImage = this . props . theme !== 'vscode-dark' ? './images/ExpandAll/ExpandAll_16x_vscode.svg' :
69- './images/ExpandAll/ExpandAll_16x_vscode_dark.svg' ;
70- const interruptImage = this . props . theme !== 'vscode-dark' ? './images/Interrupt/Interrupt_16x_vscode.svg' :
71- './images/Interrupt/Interrupt_16x_vscode_dark.svg' ;
72-
7356 const progressBar = this . state . busy && ! this . props . ignoreProgress ? < Progress /> : undefined ;
7457
7558 return (
@@ -78,28 +61,28 @@ export class MainPanel extends React.Component<IMainPanelProps, IMainPanelState>
7861 < MenuBar theme = { this . props . theme } stylePosition = 'top-fixed' >
7962 { this . renderExtraButtons ( ) }
8063 < CellButton theme = { this . props . theme } onClick = { this . collapseAll } disabled = { ! this . canCollapseAll ( ) } tooltip = { getLocString ( 'DataScience.collapseAll' , 'Collapse all cell inputs' ) } >
81- < RelativeImage class = 'cell-button-image' path = { collapseAllImage } />
64+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . CollapseAll } />
8265 </ CellButton >
8366 < CellButton theme = { this . props . theme } onClick = { this . expandAll } disabled = { ! this . canExpandAll ( ) } tooltip = { getLocString ( 'DataScience.expandAll' , 'Expand all cell inputs' ) } >
84- < RelativeImage class = 'cell-button-image' path = { expandAllImage } />
67+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . ExpandAll } />
8568 </ CellButton >
8669 < CellButton theme = { this . props . theme } onClick = { this . export } disabled = { ! this . canExport ( ) } tooltip = { getLocString ( 'DataScience.export' , 'Export as Jupyter Notebook' ) } >
87- < RelativeImage class = 'cell-button-image' path = { saveAsImage } />
70+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . SaveAs } />
8871 </ CellButton >
8972 < CellButton theme = { this . props . theme } onClick = { this . restartKernel } tooltip = { getLocString ( 'DataScience.restartServer' , 'Restart iPython Kernel' ) } >
90- < RelativeImage class = 'cell-button-image' path = { restartImage } />
73+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . Restart } />
9174 </ CellButton >
9275 < CellButton theme = { this . props . theme } onClick = { this . interruptKernel } tooltip = { getLocString ( 'DataScience.interruptKernel' , 'Interrupt iPython Kernel' ) } >
93- < RelativeImage class = 'cell-button-image' path = { interruptImage } />
76+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . Interrupt } />
9477 </ CellButton >
9578 < CellButton theme = { this . props . theme } onClick = { this . undo } disabled = { ! this . canUndo ( ) } tooltip = { getLocString ( 'DataScience.undo' , 'Undo' ) } >
96- < RelativeImage class = 'cell-button-image' path = { undoImage } />
79+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . Undo } />
9780 </ CellButton >
9881 < CellButton theme = { this . props . theme } onClick = { this . redo } disabled = { ! this . canRedo ( ) } tooltip = { getLocString ( 'DataScience.redo' , 'Redo' ) } >
99- < RelativeImage class = 'cell-button-image' path = { redoImage } />
82+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . Redo } />
10083 </ CellButton >
10184 < CellButton theme = { this . props . theme } onClick = { this . clearAll } tooltip = { getLocString ( 'DataScience.clearAll' , 'Remove All Cells' ) } >
102- < RelativeImage class = 'cell-button-image' path = { clearButtonImage } />
85+ < Image theme = { this . props . theme } class = 'cell-button-image' image = { ImageName . Cancel } />
10386 </ CellButton >
10487 </ MenuBar >
10588 < div className = 'top-spacing' />
0 commit comments