QtPyVCP - GCodeEditor - Widget Styling - Please review and comment.

More
15 Dec 2019 02:45 #152670 by Donb9261
I have been working to get the QScintilla editor styled so it is a bit easier to read than the base model. I have attached a few photos of what it looks like running a program and them singling out each code. Each G, M, P, etc has it's own color. I have increased the font size and used bold face Ubuntu fonts. I kept the left gutter default background color but used a dark background in the editor column for high contrast viewing.

I may make a custom data import so that you can set styles as you see fit. We will see.

IMO, it is easier to read. It was rather challenging to make the changes.

Please review the photos and suggest anything you might see needs improvement. It takes a village...



Attachments:
The following user(s) said Thank You: BigJohnT, tommylight, KCJ, Leon82

Please Log in or Create an account to join the conversation.

More
15 Dec 2019 03:03 #152672 by tommylight
Looks nice and easy on the eyes! Thank you.

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 17:53 #152866 by BigJohnT
Looks good, can you share the code?

JT

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 17:56 #152867 by Donb9261
Yes. Do you want the complete files or just the snippets?

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 18:45 #152869 by Donb9261
I ask because it requires a lot of changes. One file but tons of changes. I recommend making a copy of your gcodeeditor.py file and naming it with a .old extension and install mine. It should work for you. You will have 2 new slots you can disreagrd. They will not effect your runtime.

The file is the gcodeeditor.py file. Mine has additional slots installed for other purposes. See my other posts. I have commented all the changes made. All my comments will have ### so you know which ones you need to look at.

The background color is set in your style.qss file as follows:

QsciScintilla {
qproperty-backgroundcolor: #303030;
qproperty-marginbackgroundcolor: #D9DADB;
}

If you have issues let me know.

File Attachment:

File Name: gcode_editor.py.zip
File Size:7 KB
Attachments:
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 19:07 #152870 by TurBoss
hello, thanks for the improvements

would you like to include this changes in the codebase?

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 19:10 - 18 Dec 2019 19:12 #152871 by Donb9261
Hello,

I am not sure if it is done yet. My custom slots probably would not need to be included. With respect to that, I assume those can simply be extracted.

If everyone agrees I do not see why not. Other than making sure my code addition is efficient and clear to all who try to use it or create additional mods.

I am by no means a solid Python coder. Learning.
Last edit: 18 Dec 2019 19:12 by Donb9261.

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 19:18 #152872 by TurBoss
hehe

i'm just reading the code can be cleaned and polished :)

let us know when you are done

Thank you

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 19:19 #152873 by Donb9261
Of course. I will. Should be a day or 2.
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 20:20 #152877 by KCJ
Nice work! Really like the color choices.
The following user(s) said Thank You: Donb9261

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.130 seconds
Powered by Kunena Forum