[1] application.py: Fixed font load loop. As exiting on a non 0 return to the font load. That return value is actually an index to the loaded font to allow later referencing if needed. An error is a -1 return. So made the test a < 0 assessment as 0+ is success.
[2] gcode_editor.py:
collapsed editor classes into a single class
implimented getters/setters using annotations to support QSS control of lexer coloring and some base editor coloring
combined Don Bozarth's lexer updates to give more syntax coloring. This may have implications of needed a darker background in the editor.
Sublassed off VCPBaseWidget to allow rules to be applied to the editor. Also means the initlaize/terminate calls can be used
QSS setting of font. All that is needed is the Font Family Name. Utiliising font database loading from yaml means custom fonts can be shipped/used in a gui.
added a new Slot for refreshing the editors lexer font to support dynamic font changing
Improved "Save" to save to a system wide /tmp location if no file name in place. Expectation is user will do a Save As at some point to put some place sensible for them.
Using standard Save As dialogue
dynamic gutter size setting based on file load and when new lines are entered into the editor
[1] application.py: Fixed font load loop. As exiting on a non 0 return to the font load. That return value is actually an index to the loaded font to allow later referencing if needed. An error is a -1 return. So made the test a < 0 assessment as 0+ is success.
[2] gcode_editor.py:
Hopefully all makes sense. Cheers, James.