aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/js/editor
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-05 14:43:51 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-05 14:43:51 +0200
commitb023fa155e066af953ff7b456f68a39c8cce1ebb (patch)
treeb1435d76116fcd57f42b30a538b4201612d82279 /language-web/src/main/js/editor
parentFix typo in environmental variable name (diff)
downloadrefinery-b023fa155e066af953ff7b456f68a39c8cce1ebb.tar.gz
refinery-b023fa155e066af953ff7b456f68a39c8cce1ebb.tar.zst
refinery-b023fa155e066af953ff7b456f68a39c8cce1ebb.zip
Appearance fixes
Diffstat (limited to 'language-web/src/main/js/editor')
-rw-r--r--language-web/src/main/js/editor/EditorButtons.jsx13
-rw-r--r--language-web/src/main/js/editor/EditorStore.jsx6
2 files changed, 11 insertions, 8 deletions
diff --git a/language-web/src/main/js/editor/EditorButtons.jsx b/language-web/src/main/js/editor/EditorButtons.jsx
index 422c8a6d..f67afdbf 100644
--- a/language-web/src/main/js/editor/EditorButtons.jsx
+++ b/language-web/src/main/js/editor/EditorButtons.jsx
@@ -13,17 +13,14 @@ import { useRootStore } from '../RootStore';
13 13
14const useStyles = makeStyles(theme => ({ 14const useStyles = makeStyles(theme => ({
15 iconButton: { 15 iconButton: {
16 padding: 8, 16 padding: 7,
17 minWidth: 36, 17 minWidth: 36,
18 border: 0,
19 color: theme.palette.text.primary,
18 '&.MuiButtonGroup-groupedTextHorizontal': { 20 '&.MuiButtonGroup-groupedTextHorizontal': {
19 borderRight: 0, 21 borderRight: 0,
20 }, 22 },
21 }, 23 },
22 flatToggleButton: {
23 padding: 8,
24 border: 0,
25 color: theme.palette.text.primary,
26 },
27 divider: { 24 divider: {
28 margin: theme.spacing(0.5), 25 margin: theme.spacing(0.5),
29 } 26 }
@@ -49,7 +46,7 @@ export default observer(() => {
49 disabled={!editorStore.canRedo} 46 disabled={!editorStore.canRedo}
50 onClick={() => editorStore.redo()} 47 onClick={() => editorStore.redo()}
51 className={classes.iconButton} 48 className={classes.iconButton}
52 aria-label='REdo' 49 aria-label='Redo'
53 > 50 >
54 <RedoIcon fontSize='small'/> 51 <RedoIcon fontSize='small'/>
55 </Button> 52 </Button>
@@ -63,7 +60,7 @@ export default observer(() => {
63 selected={editorStore.showLineNumbers} 60 selected={editorStore.showLineNumbers}
64 onChange={() => editorStore.toggleLineNumbers()} 61 onChange={() => editorStore.toggleLineNumbers()}
65 size='small' 62 size='small'
66 className={classes.flatToggleButton} 63 className={classes.iconButton}
67 aria-label='Show line numbers' 64 aria-label='Show line numbers'
68 > 65 >
69 <FormatListNumberedIcon fontSize='small'/> 66 <FormatListNumberedIcon fontSize='small'/>
diff --git a/language-web/src/main/js/editor/EditorStore.jsx b/language-web/src/main/js/editor/EditorStore.jsx
index 6b03b383..b6f9bc0a 100644
--- a/language-web/src/main/js/editor/EditorStore.jsx
+++ b/language-web/src/main/js/editor/EditorStore.jsx
@@ -9,6 +9,8 @@ export default class EditorStore {
9 value = ''; 9 value = '';
10 /** @type {boolean} */ 10 /** @type {boolean} */
11 showLineNumbers = false; 11 showLineNumbers = false;
12 /** @type {boolean} */
13 showLigatures = true;
12 14
13 constructor() { 15 constructor() {
14 this.atom = createAtom('EditorStore'); 16 this.atom = createAtom('EditorStore');
@@ -78,4 +80,8 @@ export default class EditorStore {
78 toggleLineNumbers() { 80 toggleLineNumbers() {
79 this.showLineNumbers = !this.showLineNumbers; 81 this.showLineNumbers = !this.showLineNumbers;
80 } 82 }
83
84 toggleLigatures() {
85 this.showLigatures = !this.showLigatures;
86 }
81} 87}