From 046c6188f917afa85441ccc8d09788dbce1e7333 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Thu, 8 Nov 2018 15:05:19 -0800 Subject: [PATCH] Don't import scratch-gui internals --- src/renderer/app.css | 12 ++++++++++++ src/renderer/index.js | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/renderer/app.css diff --git a/src/renderer/app.css b/src/renderer/app.css new file mode 100644 index 0000000..48cd141 --- /dev/null +++ b/src/renderer/app.css @@ -0,0 +1,12 @@ +/* Adapted from scratch-gui/src/playground/index.css */ +html, +body, +.app { + width: 100%; + height: 100%; + margin: 0; + + /* Setting min height/width makes the UI scroll below those sizes */ + min-width: 1024px; + min-height: 640px; /* Min height to fit sprite/backdrop button */ +} diff --git a/src/renderer/index.js b/src/renderer/index.js index ec2d38e..427d3b9 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -1,12 +1,13 @@ import React from 'react'; import ReactDOM from 'react-dom'; - import GUI, {AppStateHOC} from 'scratch-gui'; -import {defaultProjectId} from 'scratch-gui/src/reducers/project-state'; -import styles from 'scratch-gui/src/playground/index.css'; import ElectronStorageHelper from '../common/ElectronStorageHelper'; +import styles from './app.css'; + +const defaultProjectId = 0; + // Register "base" page view // analytics.pageview('/');