diff --git a/src/App/App.css b/src/App/App.css index 0f2957d..c0d4301 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -53,6 +53,10 @@ summary { height: 26px; } +.toolbarGroup { + display: inline-block; +} + button.active { border: solid blue 2px; background-color: rgba(0,0,255,0.2); diff --git a/src/App/App.tsx b/src/App/App.tsx index c61ac88..042910d 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -193,7 +193,7 @@ export function App() { borderColor: "divider", flex: '0 0 content', overflow: "auto", - maxWidth: 350, + maxWidth: '30vw', }}> diff --git a/src/App/TopPanel.tsx b/src/App/TopPanel.tsx index 721cdd7..9ec6eb1 100644 --- a/src/App/TopPanel.tsx +++ b/src/App/TopPanel.tsx @@ -14,11 +14,13 @@ import StopIcon from '@mui/icons-material/Stop'; import UndoIcon from '@mui/icons-material/Undo'; import RedoIcon from '@mui/icons-material/Redo'; import InfoOutlineIcon from '@mui/icons-material/InfoOutline'; +import KeyboardIcon from '@mui/icons-material/Keyboard'; import { formatTime } from "./util"; import { InsertMode } from "../VisualEditor/VisualEditor"; import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo"; import { About } from "./About"; +import { Stack } from "@mui/material"; export type TopPanelProps = { rt?: BigStep, @@ -199,96 +201,104 @@ export function TopPanel({rt, rtIdx, time, setTime, onInit, onClear, onRaise, on return <>
+ {/* shortcuts / about */} +
+ ~}> + + + +
-
+   -
- Ctrl+Z}> - - - Ctrl+Shift+Z}> - - -
+ {/* undo / redo */} +
+ Ctrl+Z}> + + + Ctrl+Shift+Z}> + + +
-   +   -
- {([ - ["and", "AND-states", , A], - ["or", "OR-states", , O], - ["pseudo", "pseudo-states", , P], - ["shallow", "shallow history", , H], - ["deep", "deep history", , <>], - ["transition", "transitions", , T], - ["text", "text", <> T , X], - ] as [InsertMode, string, ReactElement, ReactElement][]).map(([m, hint, buttonTxt, keyInfo]) => - - )} -
+ {/* insert rountangle / arrow / ... */} +
+ {([ + ["and", "AND-states", , A], + ["or", "OR-states", , O], + ["pseudo", "pseudo-states", , P], + ["shallow", "shallow history", , H], + ["deep", "deep history", , <>], + ["transition", "transitions", , T], + ["text", "text", <> T , X], + ] as [InsertMode, string, ReactElement, ReactElement][]).map(([m, hint, buttonTxt, keyInfo]) => + + )} +
-   +   -
+ {/* execution */} +
- I}> - - - C}> - - + {/* init / clear / pause / real time */} +
+ I}> + + + C}> + + +   + Space toggles}> + + + +
-   +   - Space toggles}> - - - + {/* speed */} +
+   + S}> + + + onTimeScaleChange(e.target.value, Math.round(performance.now()))}/> + F}> + + +
-   +   -   - S}> - - - onTimeScaleChange(e.target.value, Math.round(performance.now()))}/> - F}> - - - -   - -   - + {/* time, next */} +
+
+   + +   +
+
+   + + Tab}> + + +
+
-   +
- -   - - - Tab}> - - - -   - Backspace}> - - - -
- -   - -
-
+
{ast.inputEvents && <> @@ -316,20 +326,7 @@ export function TopPanel({rt, rtIdx, time, setTime, onInit, onClear, onRaise, on } -   - -
- ~}> - setShowKeys(e.target.checked)}> - -
- -
- -   - - - -
; +
+ ; }