Merge pull request #639 from jdolan/jdolan/use-theme-font-color

Use Gtk theme default text color for console.
This commit is contained in:
Timothee "TTimo" Besset 2019-02-25 14:40:39 +00:00 committed by GitHub
commit 3f79dc370c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1778,12 +1778,10 @@ extern "C" void Sys_FPrintf_VA( int level, const char *text, va_list args ) {
const GdkColor yellow = { 0, 0xb0ff, 0xb0ff, 0x0000 }; const GdkColor yellow = { 0, 0xb0ff, 0xb0ff, 0x0000 };
const GdkColor red = { 0, 0xffff, 0x0000, 0x0000 }; const GdkColor red = { 0, 0xffff, 0x0000, 0x0000 };
const GdkColor black = { 0, 0x0000, 0x0000, 0x0000 };
static GtkTextTag* error_tag = gtk_text_buffer_create_tag( buffer, "red_foreground", "foreground-gdk", &red, NULL ); static GtkTextTag* error_tag = gtk_text_buffer_create_tag( buffer, "red_foreground", "foreground-gdk", &red, NULL );
static GtkTextTag* warning_tag = gtk_text_buffer_create_tag( buffer, "yellow_foreground", "foreground-gdk", &yellow, NULL ); static GtkTextTag* warning_tag = gtk_text_buffer_create_tag( buffer, "yellow_foreground", "foreground-gdk", &yellow, NULL );
static GtkTextTag* standard_tag = gtk_text_buffer_create_tag( buffer, "black_foreground", "foreground-gdk", &black, NULL ); GtkTextTag* tag = NULL;
GtkTextTag* tag;
switch ( level ) switch ( level )
{ {
case SYS_WRN: case SYS_WRN:
@ -1795,7 +1793,6 @@ extern "C" void Sys_FPrintf_VA( int level, const char *text, va_list args ) {
case SYS_STD: case SYS_STD:
case SYS_VRB: case SYS_VRB:
default: default:
tag = standard_tag;
break; break;
} }
gtk_text_buffer_insert_with_tags( buffer, &iter, buf, length, tag, (char *) NULL ); gtk_text_buffer_insert_with_tags( buffer, &iter, buf, length, tag, (char *) NULL );