Skip to content

Commit

Permalink
Make use of the new icons
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou authored and IsabelParedes committed Nov 28, 2024
1 parent 8931e28 commit 8d0d6e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions packages/base/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { LabIcon } from '@jupyterlab/ui-components';
import * as d3Color from 'd3-color';

import logoStr from '../style/icon/logo.svg';
import stlStr from '../style/icon/stl.svg';
import stpStr from '../style/icon/stp.svg';
import axesIconStr from '../style/icon/axes.svg';
import boxIconStr from '../style/icon/box.svg';
import coneIconStr from '../style/icon/cone.svg';
Expand Down Expand Up @@ -38,6 +40,16 @@ export const logoIcon = new LabIcon({
svgstr: logoStr
});

export const stlIcon = new LabIcon({
name: 'jupytercad:stl',
svgstr: stlStr
});

export const stpIcon = new LabIcon({
name: 'jupytercad:stp',
svgstr: stpStr
});

export const minimizeIcon = new LabIcon({
name: 'jupytercad:minimize-icon',
svgstr: minimizeIconStr
Expand Down
4 changes: 2 additions & 2 deletions python/jupytercad_core/src/stepplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { IThemeManager, WidgetTracker } from '@jupyterlab/apputils';
import { JupyterCadStepModelFactory } from './modelfactory';
import { JupyterCadWidgetFactory } from '../factory';
import { JupyterCadStepDoc } from './model';
import { logoIcon } from '@jupytercad/base';
import { stpIcon } from '@jupytercad/base';

const FACTORY = 'JupyterCAD STEP Viewer';

Expand Down Expand Up @@ -55,7 +55,7 @@ const activate = (
extensions: ['.step', '.STEP'],
fileFormat: 'text',
contentType: 'step',
icon: logoIcon
icon: stpIcon
});

const stepSharedModelFactory: SharedDocumentFactory = () => {
Expand Down
4 changes: 2 additions & 2 deletions python/jupytercad_core/src/stlplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { IThemeManager, WidgetTracker } from '@jupyterlab/apputils';
import { JupyterCadStlModelFactory } from './modelfactory';
import { JupyterCadWidgetFactory } from '../factory';
import { JupyterCadStlDoc } from './model';
import { logoIcon } from '@jupytercad/base';
import { stlIcon } from '@jupytercad/base';

const FACTORY = 'JupyterCAD STL Viewer';

Expand Down Expand Up @@ -55,7 +55,7 @@ const activate = (
extensions: ['.stl', '.STL'],
fileFormat: 'text',
contentType: 'stl',
icon: logoIcon
icon: stlIcon
});

const stlSharedModelFactory: SharedDocumentFactory = () => {
Expand Down

0 comments on commit 8d0d6e4

Please sign in to comment.