Skip to content

Commit

Permalink
Merge pull request #269 from magjac/new-look
Browse files Browse the repository at this point in the history
New look
  • Loading branch information
magjac authored Jan 21, 2024
2 parents 8ecdc65 + f235a9e commit 410a867
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Updated [Graphviz](https://graphviz.org/) from version [2.50.0](https://gitlab.com/graphviz/graphviz/-/blob/main/CHANGELOG.md?ref_type=heads#2500-2021-12-04) to version [9.0.0](https://gitlab.com/graphviz/graphviz/-/blob/main/CHANGELOG.md?ref_type=heads#900-2023-09-11) through [@hpcc-js/wasm](https://github.com/hpcc-systems/hpcc-js-wasm) version [2.14.1](https://github.com/hpcc-systems/hpcc-js-wasm/blob/trunk/CHANGELOG.md#2141-2023-10-12), containing a lot of improvements and fixes, including a fix for:
* Failure of arrowhead and arrowtail to respect penwidth ([Graphviz issue #372](https://gitlab.com/graphviz/graphviz/issues/372))
* New look with blueish primary and greenish secondary color and a toolbar with a Graphviz logo, a blueish grid on white as background and slightly larger text buttons.
* More pronounced highlighting in the DOT source of nodes and edges selected in the graph, using shades of the blueish primary color.

### Fixed
* Lost characters when typing fast and DOT parsing errors occur #236
Expand Down
Binary file added public/GraphvizLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions src/AboutDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ const styles = theme => ({
display: 'flex',
justifyContent: 'space-between',
},
copyright: {
marginTop: theme.spacing(5),
},
});

class AboutDialog extends React.Component {
Expand Down Expand Up @@ -145,9 +142,6 @@ class AboutDialog extends React.Component {
{graphvizVersion}
</a>
</DialogContentText>
<DialogContentText variant='caption' className={classes.copyright}>
&copy; 2018-2022 Magnus Jacobsson Interactive AB
</DialogContentText>
</DialogContent>
</Dialog>
</div>
Expand Down
24 changes: 23 additions & 1 deletion src/ButtonAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Toolbar } from '@mui/material';
import { Typography } from '@mui/material';
import { Button } from '@mui/material';
import { IconButton } from '@mui/material';
import { Icon } from '@mui/material';
import { Menu as MenuIcon } from '@mui/icons-material';
import { Add as AddIcon } from '@mui/icons-material';
import { OpenInBrowser as OpenInBrowserIcon } from '@mui/icons-material';
Expand All @@ -23,6 +24,11 @@ const styles = {
root: {
flexGrow: 1,
},
toolbar: {
backgroundSize: '16px 16px',
backgroundImage: 'linear-gradient(to right, #4ed1f860 1px, transparent 1px), linear-gradient(to bottom, #4ed1f860 1px, transparent 1px)',
backgroundColor: 'white',
},
flex: {
flexGrow: 1,
},
Expand All @@ -36,6 +42,16 @@ const styles = {
color: 'inherit',
},
},
imageIcon: {
display: 'block',
height: '100%',
verticalAlign: 'middle',
},
iconRoot: {
height: '64px',
width: '72px',
verticalAlign: 'middle',
},
};

function ButtonAppBar(props) {
Expand Down Expand Up @@ -106,7 +122,7 @@ function ButtonAppBar(props) {
<AppBar
position="static"
>
<Toolbar id="toolbar">
<Toolbar id="toolbar" className={classes.toolbar}>
<IconButton
id="menu"
className={classes.menuButton}
Expand Down Expand Up @@ -168,6 +184,9 @@ function ButtonAppBar(props) {
color="inherit"
className={classes.flex}
>
<Icon classes={{root: classes.iconRoot}}>
<img className={classes.imageIcon} src="GraphvizLogo.png" width="64" height="64"/>
</Icon>
Graphviz Visual Editor
</Typography>
<IconButton
Expand Down Expand Up @@ -205,19 +224,22 @@ function ButtonAppBar(props) {
1:1
</Button>
<Button
size="large"
color="inherit"
onClick={handleInsertClick}
>
Insert
</Button>
<Button
color="inherit"
size="large"
onClick={handleNodeFormatClick}
>
Node format
</Button>
<Button
color="inherit"
size="large"
onClick={handleEdgeFormatClick}
>
Edge format
Expand Down
4 changes: 2 additions & 2 deletions src/TextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const styles = {
},
aceSelectedWord: {
position: 'absolute',
background: 'rgb(250, 250, 255)',
border: '1px solid rgb(200, 200, 250)',
background: '#d8f4fd',
border: '1px solid #02c1ff',
},
};

Expand Down
4 changes: 2 additions & 2 deletions src/withRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { CssBaseline } from '@mui/material';
const theme = createTheme({
palette: {
primary: {
main: "#ffffcc",
main: "#4ed1f8", // Blueish
},
secondary: {
main: "#99ccff",
main: "#19ccaa", // Greenish
},
},
components: {
Expand Down

0 comments on commit 410a867

Please sign in to comment.