Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/base/src/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import visibilitySvgStr from '../style/icons/visibility.svg';
import nonVisibilitySvgStr from '../style/icons/nonvisibility.svg';
import geoJsonSvgStr from '../style/icons/geojson.svg';
import moundSvgStr from '../style/icons/mound.svg';
import logoMiniQGZ from '../style/icons/logo_mini_qgz.svg';

export const logoIcon = new LabIcon({
name: 'jupytergis::logo',
Expand Down Expand Up @@ -54,3 +55,8 @@ export const moundIcon = new LabIcon({
name: 'jupytergis::mound',
svgstr: moundSvgStr
});

export const logoMiniIconQGZ = new LabIcon({
name: 'jupytergis::logoQGZ',
svgstr: logoMiniQGZ
});
31 changes: 31 additions & 0 deletions packages/base/style/icons/logo_mini_qgz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions python/jupytergis_qgis/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ import { PathExt } from '@jupyterlab/coreutils';
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import { Widget } from '@lumino/widgets';

import { JupyterGISWidget, logoMiniIcon, requestAPI } from '@jupytergis/base';
import {
JupyterGISWidget,
logoMiniIcon,
logoMiniIconQGZ,
requestAPI
} from '@jupytergis/base';
import { JupyterGISWidgetFactory } from '@jupytergis/jupytergis-core';
import { IJupyterGISDocTracker, IJupyterGISWidget } from '@jupytergis/schema';
import { QGSModelFactory, QGZModelFactory } from './modelfactory';
Expand Down Expand Up @@ -143,7 +148,7 @@ const activate = async (
extensions: ['.qgz', '.QGZ'],
fileFormat: 'base64',
contentType: 'QGZ',
icon: logoMiniIcon
icon: logoMiniIconQGZ
});

const QGISSharedModelFactory: SharedDocumentFactory = () => {
Expand All @@ -159,6 +164,7 @@ const activate = async (
);

const widgetCreatedCallback = (sender: any, widget: JupyterGISWidget) => {
widget.title.icon = logoMiniIconQGZ;
// Notify the instance tracker if restore data needs to update.
widget.context.pathChanged.connect(() => {
tracker.save(widget);
Expand Down
Loading