Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change font size in code editor #535

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change font size in code editor
mishteegandhi committed Dec 21, 2023
commit 2c3ec3bb37a572e2d05afab7a7bc109dafd2e835
20 changes: 10 additions & 10 deletions ArduinoFrontend/src/app/code-editor/code-editor.component.ts
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ export class CodeEditorComponent {
/**
* Monaco code editor options
*/
size = 15
size = 15;
editorOptions = {
theme: 'vs',
language: 'c',
@@ -147,19 +147,19 @@ export class CodeEditorComponent {
}
}
/**
* Increase the size of the font in the editor
*/
IncreaseFont(fontSize: number){
* Increase the size of the font in the editor
*/
IncreaseFont(fontSize: number) {
this.size = this.size + 1;
this.editorOptions = {...this.editorOptions, fontSize:this.size};
this.editorOptions = {...this.editorOptions, fontSize: this.size};
}
/**
* Decrease the size of the font in the editor
*/
DecreaseFont(fontSize: number){
* Decrease the size of the font in the editor
*/
DecreaseFont(fontSize: number) {
this.size = this.size - 1;
this.editorOptions = {...this.editorOptions, fontSize:this.size};
}
this.editorOptions = {...this.editorOptions, fontSize: this.size};
}
/**
* Download the code from code editor
*/