Skip to content

Commit

Permalink
Added comment for ACE_THEMES and added CSS for Editor-toolar img.
Browse files Browse the repository at this point in the history
  • Loading branch information
GottaGetPaid committed Nov 21, 2024
1 parent 3d0475d commit e56b4ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/renderer/Editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
.Editor-toolbar img {
width: 100%;
height: 100%;
width: 20px;
height: 20px;
transition: filter 0.25s;
/* Fix other filter variables so transition is directly from black to blue: */
filter: invert(0%) sepia(100%) hue-rotate(180deg) saturate(0);
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const STATUS_TOOLTIPS: { [k in EditorContentStatus]: string } = {
extDirty:
'The code that will be uploaded to the robot was last changed in an external program.',
};

/**
* Content of the editor status indicator (next to the file name).
*/
Expand All @@ -58,11 +59,13 @@ const STATUS_TEXT: { [k in EditorContentStatus]: string } = {
extDirty: 'Externally modified',
};

/**
* Color themes for the ACE code editor.
*/
const ACE_THEMES = {
dawn: 'Dawn',
chrome: 'Chrome',
clouds: 'Clouds',

dreamweaver: 'Dreamweaver',
monokai: 'Monokai',
tomorrow_night: 'Tomorrow Night',
Expand Down Expand Up @@ -269,9 +272,7 @@ export default function Editor({
</button>
</div>
<div className="Editor-toolbar-group">
<button type="button">
<img src={themeSvg} alt="Change Theme" />
</button>
<img src={themeSvg} alt="Change Theme" />
<select
onChange={(e) => handleThemeChange(`ace/theme/${e.target.value}`)}
name="Editor-toolbar-opmode"
Expand Down

0 comments on commit e56b4ad

Please sign in to comment.