Customizing GCodeDisplay

More
28 Sep 2020 11:03 #184137 by phillc54
Is there a way to change colors, fonts, backgrounds etc. with stylesheets for the GCodeDisplay?

After playing around I managed to change the ScrollBars with a qss file but I couldn't change anything else.

I did manage to change some of the margin stuff from the handler file but I don't seem to be able to get any further.

This is what I did manage to do:
Warning: Spoiler!
The following user(s) said Thank You: pinder

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

More
28 Sep 2020 12:16 #184153 by cmorley
Replied by cmorley on topic Customizing GCodeDisplay
AFAIK there is no way to change colors of the actual editor with stylesheets.
There is not a lot of info on scintilla/Qscintilla.
The best reference links are in the gcode_editor.py file

Chris
The following user(s) said Thank You: phillc54

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

More
28 Sep 2020 12:32 #184160 by cmorley
Replied by cmorley on topic Customizing GCodeDisplay
I could add a hook to catch when the styling changes and call a function in the handler file so you can parce it and decide what to do.
The following user(s) said Thank You: phillc54

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

More
28 Sep 2020 12:37 #184162 by cmorley
The following user(s) said Thank You: phillc54, tommylight

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

More
23 Nov 2020 19:09 #190137 by persei8
Replied by persei8 on topic Customizing GCodeDisplay
I see you have now added the ability to style the gcodeDisplay via .qss file but none of them seem to apply to the line numbers in the left margin. The default black is hard to see with a dark background. Can this be added or should I set a lighter background? Thanks.
Jim

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

More
24 Nov 2020 03:04 #190185 by cmorley
Replied by cmorley on topic Customizing GCodeDisplay
I think I could - I'll look into it.

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

More
24 Nov 2020 05:45 #190189 by cmorley
Replied by cmorley on topic Customizing GCodeDisplay
ok pushed to master, here is the full deal - note background color setting has changed from previous:
EditorBase{
qproperty-styleColorBackground: lightblue;
qproperty-styleColor0: black;
qproperty-styleColor1: #000000; /* black */
qproperty-styleColor2: red;
qproperty-styleColor3: black;
qproperty-styleColor4: yellow;
qproperty-styleColorMarginText: White;
qproperty-styleColorMarginBackground: blue;
qproperty-styleFont0: "Times,12,-1,0,90,0,0,0,0,0";
qproperty-styleFont1: "Times,18,-1,0,90,1,0,0,0,0";
qproperty-styleFont2: "Times,12,-1,0,90,0,0,0,0,0";
qproperty-styleFont3: "Times,12,-1,0,90,0,0,0,0,0";
qproperty-styleFont4: "Times,12,-1,0,90,0,0,0,0,0";
qproperty-styleFontMargin: "Times,14,-1,0,90,0,0,0,0,0";
}
The following user(s) said Thank You: phillc54

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

Moderators: cmorley
Time to create page: 0.452 seconds
Powered by Kunena Forum