Gcode window text color change Gscreen

More
7 years 8 months ago #126988 by cmorley
ok I have a bit of a solution to try: in your gtkrc file on the bottom of the file add this:
Code:
style "halsourceview" = "default" { base[SELECTED] = "#FFFFFF" # hilight color text[NORMAL] = "#000000" # normal gcode text base[INSENSITIVE] = "#d7d7d7" # gcode background bg[INSENSITIVE] = "#999999" # gcode line number background } widget "*.*.gcode_view" style "halsourceview"
You can change the colors of course and there probably is more options but this is a start.

but there is one small issue - this code depends on knowing the name of the hal_sourceview widget in the glade file. for the default gscreen screen it's called gcode_view - if yours is different then you need to change the name in the code snippet.

As for syntax colors of the gcode - its more complicated and i am unfamiliar with it.
Here is a reference but i am not sure how colors are actually set.
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Highlighting_In_Gedit

Please Log in to join the conversation.

More
7 years 8 months ago #127021 by Ivan_The_Red
Thanks Again Chris, That worked great .... I tried to apply the same logic to the tooledit1 widget because the background for the tool editor is black as well but it didnt work.
I was also trying to resize the width and height of the gremlin window when i enter "full screen" view using code but I cant seem to find any documentation on how to do that either.

Im so close to finishing this GUI , could you offer any solutions?

Thanks for all of your help.

Jeff

Please Log in to join the conversation.

More
7 years 8 months ago #127025 by cmorley
Code:
style "tooledit" = "default" { base[NORMAL] = "#d7d7d7" # background color bg[NORMAL] = "#d7d7d7" # header color text[NORMAL] = "#000000" # text widget "*.*.tooledit*" style "tooledit"

It seems the the parser didn't like the '1' in tooledit1 for I used a wild card.

resizing widgets is specific to the layout/settings used to contain the widget.
widgets can be made to use as much space as possible or to always be one size etc.
I would need to see the code/glade file to be more specific.

Chris M

Please Log in to join the conversation.

More
7 years 8 months ago #127029 by cmorley
add this for header text color:
fg[NORMAL] = "#000000" # header text

Please Log in to join the conversation.

More
7 years 8 months ago #127075 by Ivan_The_Red
Chris,
Everything worked out great, I changed both the tool editor and the offsets page to suit my tastes. I also found out how to remove a program from the gremlin widget which is nice when you switch from running a program to jog or mdi mode.

Thanks for taking the time to help me out.....enjoy

Jeff

Please Log in to join the conversation.

More
7 years 8 months ago #127076 by cmorley
Excellent.
I actually added a modified version of dusk to linuxcnc for gscreen just as example code - so thanks for that.

I assume you are using a custom screen - any screen shots?

You are welcome - I am happy people are using Gscreen.

Chris

Please Log in to join the conversation.

More
7 years 8 months ago #127126 by Ivan_The_Red
Hey Chris,

I thought I was finished with it .... finally, but when I went to edit a Gcode file , the Gcode editor widget exhibited the same problems with background color etc. etc. as the tool edit page and offset page I attempted to apply the previous logic to the 'gtkrc' file for a widget that I thought was the Gcode editor but it didn't function as expected. Is there anything different with that particular entity ?
Do you know how I can adjust the colors of the Gcode editor ?

Anyways, attached are some pictures of the GScreen GUI that I've been working on for quite some time and I really need to thank you for writing it. I appreciated the layout because it wasn't "busy" and offered a great base to expand on to suit my needs. The code that you wrote was pretty easy to follow once I learned the basics of Python and before Gscreen I had never even laid eyes on that programming language. It contained all of the items that I needed in a very user friendly layout. The GUI I ended up with is also interfaced with an Arduino pendant that I'm right in the middle of finishing also. Between learning Python , Hal , Arduino & Serial communications its been a great learning experience.

Thanks for everything, its people like you and the other extremely experienced and smart people who support this forum that make
it possible for others to learn some really cool stuff.

Jeff

Please Log in to join the conversation.

More
7 years 8 months ago #127134 by cmorley
when the gcode view switches to edit mode the 'sensitivity' to input changes. GTK usually uses other colors for sensitive widgets. I added a couple more line to this entry in the gtkrc file:
Code:
# These custom themed widget require the widget name # to match in the glade file style "halsourceview" = "default" { base[SELECTED] = "#FFFFFF" # hilight color text[NORMAL] = "#000000" # normal gcode text base[INSENSITIVE] = "#d7d7d7" # gcode background 'insensitive' base[NORMAL] = "#d7d7d7" # gcode background 'sensitive' bg[INSENSITIVE] = "#999999" # gcode line number background 'insensitive' bg[NORMAL] = "#999999" # gcode line number background 'sensitive' } widget "*.*.gcode_view" style "halsourceview"

I like your screen. Those couple light buttons add a little accent that is nice. Do you like the jograte as a meter display - I've never thought of that.

Thank you for the kind words. I am always impressed with what people can make with the tools I've knocked together!

Chris M

Please Log in to join the conversation.

More
7 years 8 months ago #127136 by Ivan_The_Red
I like the large faced indicators because I can see them from a distance while using the pendant. Being that 100% of the programmed feedrate is always at 12 o'clock , I can quickly see where im at in relation to whats been programmed by watching the big red needle.
When im using the MPG, the larger dials work better for me because they actually show the current feed rate when im turning the wheel. i do a lot of tooling , fixturing and prototype work so i have a greater need for 'manual type' indicators versus a production machine where feeds and speeds are pretty much ironed out once then run that way forever.
Ill give those changes a shot tomorrow and see where i end up.

Thanks for everything
Jeff

Please Log in to join the conversation.

More
7 years 8 months ago #127144 by cmorley
When I used to race cars, we would turn the temp and oil pressure so that 'normal' was at 12 O'clock - so I totally get what you are doing there. Very smart.

Chris

Please Log in to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum