In scope debugger, the debug | debug console window is white on black which is very difficult to read. I can use Edit | Prefs to change the background colour to white but the "foreground colour" does not affect the text colour. This remains light grey and very poor contrast against white bg.
The only other colour selector I can find is the long line marker ( vertical line ).
Is there an option to set the debug console text colour, or a hack to alter it ?
If not could someone with a little familiarity with the code point to where I can modify this in the source. thx
The function is called [`vte_terminal_set_foreground_color`](https://developer.gnome.org/vte/unstable/VteTerminal.html#vte-terminal-set-c...)
thanks for the quick reply, however I do not find that string anywhere in either geany or plugins-master :?
``` ~/geany-plugins-master -bash-4.4#echo; echo; grep -R vte_terminal_set_foreground_color *
-bash-4.4#cd ~/geany-master -bash-4.4#echo; echo; grep -R vte_terminal_set_foreground_color *
``` Are you sure that is typed correctly?
I'm guessing from the brief reply that there is not means of setting the text colour from the GUI. That seems to be an defect at least if there is anything apart from scope using this kind of console.
I'm happy to go and hack the colour and rebuild since I'm on a patched version anyway, but having a non configurable , poor visibility default is not so good.
Ah , vte_terminal_set_color_foreground: ``` -bash-4.4#echo; echo; grep -R pref_vte_colour_fore *
scope/src/conterm.c: (vte, &pref_vte_colour_fore); scope/src/conterm.c: gdk_color_parse(tmp_string, &pref_vte_colour_fore); scope/src/conterm.c: gtk_widget_modify_cursor(console, &pref_vte_colour_fore, &pref_vte_colour_back);
``` however, this is what I have already tried to change from the interface and it does not seem to change the text colour. As I said the bg colour is modifiable. Is the text colour something else or is there a bug here?
https://developer.gnome.org/vte/0.48/VteTerminal.html#vte-terminal-set-color...
thx elextr, see my previous which I posted just before your reply came up.
It would appear that the plugin is not calling that function, so, probably a bag, or incomplete.
I have found that if I set the fg colour to red, I get a red rectangle and the input cursor in the debug window, but the output text is still coming out mid-grey.
The commands sent to gdb seem to be displayed in light turquoise. Apparently the colours are hard coded. Any clues?
Sorry, you will have to read the code of scope.
Remember scope does not have a maintainer and none of the normal Geany contributors is familiar with the code, so you are unlikely to get a lot of detailed help.
OK. I was hoping zhekov may have been able to help. The relevant function seems to be the following in conterm.c conterm.h . The first arg indicates the context and is presumably responsible for the colour choice, but I don't understand where the actual code is located.
void (*dc_output)(int fd, const char *text, gint length); void (*dc_output_nl)(int fd, const char *text, gint length);
It's marked as extern but I can't see where those are defined or coming from ;?
OK. I was hoping zhekov may have been able to help. The relevant function seems to be the following in conterm.c conterm.h . The first arg indicates the context and is presumably responsible for the colour choice, but I don't understand where the actual code is located.
void (*dc_output)(int fd, const char *text, gint length); void (*dc_output_nl)(int fd, const char *text, gint length);
It's marked as extern but I can't see where those are defined or coming from ;?
I think the colors are set in ```conterm_init()```, see the following code section: ``` c else #endif /* G_OS_UNIX */ { static const char *const colors[NFD] = { "#00C0C0", "#C0C0C0", "#C00000", "#C0C0C0", "#C000C0" }; guint i;
console = get_widget("debug_context"); context_apply_config(console); debug_context = GTK_TEXT_VIEW(console); dc_output = context_output; dc_output_nl = context_output_nl; context = gtk_text_view_get_buffer(debug_context);
for (i = 0; i < NFD; i++) { fd_tags[i] = gtk_text_buffer_create_tag(context, NULL, "foreground", colors[i], NULL); } g_signal_connect(console, "button-press-event", G_CALLBACK(on_console_button_3_press), menu_connect("console_menu", &console_menu_info, NULL)); } ```
The context you mentioned refers to the index in the array ```colors```. I searched for calls to ```dc_output()``` and looked at the passed values and I think their meaning is something like this:
Context/color index | Meaning ------------------------ | ----------- 0 | commands send to gdb 1 | ouput/responses from gdb 2 | output of received errors 3 | output of "(gdb) " prompt 4 | error output from scope itself
Many thanks, I'll have another look when I get a minute. I can't remember where I got with that.
@J-Dunn: Ping. Did you have some time to take another look?
github-comments@lists.geany.org