Skip to content

Commit

Permalink
Use Windows style icon
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Jan 3, 2023
1 parent 8b02b88 commit 5cc2eaf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
15 changes: 6 additions & 9 deletions src/annotation/view.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import {
caretRightIcon,
closeIcon,
deleteIcon
} from '@jupyterlab/ui-components';
import { caretRightIcon, closeIcon } from '@jupyterlab/ui-components';
import * as React from 'react';

import { Message } from './message';
import { minimizeIcon } from '../tools';
import { IAnnotationModel } from '../types';
import { Message } from './message';

interface IAnnotationProps {
itemId: string;
Expand Down Expand Up @@ -92,17 +89,17 @@ export const FloatingAnnotation = (
<div className="jcad-Annotation-Topbar">
<div
onClick={() => {
setOpen(false);
model.removeAnnotation(itemId);
}}
>
<closeIcon.react className="jcad-Annotation-TopBarIcon" />
</div>
<div
onClick={() => {
model.removeAnnotation(itemId);
setOpen(false);
}}
>
<deleteIcon.react className="jcad-Annotation-TopBarIcon" />
<minimizeIcon.react className="jcad-Annotation-TopBarIcon" />
</div>
</div>
</Annotation>
Expand Down
9 changes: 7 additions & 2 deletions src/tools.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { LabIcon } from '@jupyterlab/ui-components';

const jvControlLight =
'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><g class="jp-icon3" fill="#616161"><g><path d="M2,6c0.55,0,1-0.45,1-1V4c0-0.55,0.45-1,1-1h1c0.55,0,1-0.45,1-1S5.55,1,5,1H4C2.34,1,1,2.34,1,4v1C1,5.55,1.45,6,2,6z"/><path d="M5,21H4c-0.55,0-1-0.45-1-1v-1c0-0.55-0.45-1-1-1c-0.55,0-1,0.45-1,1v1c0,1.66,1.34,3,3,3h1c0.55,0,1-0.45,1-1 S5.55,21,5,21z"/><path d="M20,1h-1c-0.55,0-1,0.45-1,1s0.45,1,1,1h1c0.55,0,1,0.45,1,1v1c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1V4 C23,2.34,21.66,1,20,1z"/><path d="M22,18c-0.55,0-1,0.45-1,1v1c0,0.55-0.45,1-1,1h-1c-0.55,0-1,0.45-1,1s0.45,1,1,1h1c1.66,0,3-1.34,3-3v-1 C23,18.45,22.55,18,22,18z"/><path d="M19,14.87V9.13c0-0.72-0.38-1.38-1-1.73l-5-2.88c-0.31-0.18-0.65-0.27-1-0.27s-0.69,0.09-1,0.27L6,7.39 C5.38,7.75,5,8.41,5,9.13v5.74c0,0.72,0.38,1.38,1,1.73l5,2.88c0.31,0.18,0.65,0.27,1,0.27s0.69-0.09,1-0.27l5-2.88 C18.62,16.25,19,15.59,19,14.87z M11,17.17l-4-2.3v-4.63l4,2.33V17.17z M12,10.84L8.04,8.53L12,6.25l3.96,2.28L12,10.84z M17,14.87l-4,2.3v-4.6l4-2.33V14.87z"/></g></g></svg>';
import jvControlLight from '../style/icon/jvcontrol.svg';
import minimizeIConStr from '../style/icon/minimize.svg';

export const jcLightIcon = new LabIcon({
name: 'jupytercad:control-light',
svgstr: jvControlLight
});

export const minimizeIcon = new LabIcon({
name: 'jupytercad:minimize-icon',
svgstr: minimizeIConStr
});

export const debounce = (
func: CallableFunction,
timeout = 100
Expand Down
1 change: 1 addition & 0 deletions style/icon/jvcontrol.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions style/icon/minimize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5cc2eaf

Please sign in to comment.