Closed hansu closed 8 months ago
Nice, thanks.
You may also want to adjust the high-lighting for the currently executing line in the gcode window: https://forum.linuxcnc.org/gmoccapy/50636-can-i-change-the-colors-scheme-in-the-gcode-editor#285585
Nice, thanks.
You may also want to adjust the high-lighting for the currently executing line in the gcode window: https://forum.linuxcnc.org/gmoccapy/50636-can-i-change-the-colors-scheme-in-the-gcode-editor#285585
That would be a bit too much of settings. I think the best would be to retrieve this color from the GtkSourceView theme, but I couldn't find a solution to get this color from which is defined in /usr/share/gtksourceview-3.0/styles/<style>.xml
.
Instead I used style.get_background_color(Gtk.StateFlags.SELECTED)
which is better than a fixed color I think.
Better would be that HAL_Sourceview handles the current line as selection and so automatically uses the same colors which are defined for a selected line in the theme.
I didn't mean that it should be user adjustable but that it should be changed to something more readable so what you did is just fine. I guess you could use 'line number' if you wanted the current line to be different from the 'selected line'
I guess you could use 'line number' if you wanted the current line to be different from the 'selected line'
Ah, for that we would need to access the color scheme in the xml which you have already tried.
Ah, for that we would need to access the color scheme in the xml which you have already tried.
exactly
I didn't mean that it should be user adjustable but that it should be changed to something more readable so what you did is just fine.
Have you also tested this version?
I have just finished testing your last two commits:
gmoccapy: add setting for G-code theme (GtkSourceView)
gtksourceview: apply selection color from theme
Works fine for me. Thanks for your work!
Okay then let's use this for now
Adds a setting to Gmoccapy for setting the GtkSourceView theme to avoid problems with dark themes.
Related to: https://forum.linuxcnc.org/gmoccapy/50636-can-i-change-the-colors-scheme-in-the-gcode-editor and https://forum.linuxcnc.org/gmoccapy/51124-gmocappy-defects-in-release-2-9-2
I hope everybody is fine with the name "G-code Theme" because I think a user would not know what is meant with GtkSourceView :)