Lines 961-966
Link Here
|
961 |
GdkRGBA fg, bg, bold, theme_fg, theme_bg; |
961 |
GdkRGBA fg, bg, bold, theme_fg, theme_bg; |
962 |
GdkRGBA *boldp; |
962 |
GdkRGBA *boldp; |
963 |
GtkStyleContext *context; |
963 |
GtkStyleContext *context; |
|
|
964 |
/*------ CSS ---------------------------------------------------------------------------------------------------------------*/ |
965 |
GtkCssProvider *provider; |
966 |
GdkDisplay *display; |
967 |
GdkScreen *gdkscreen; |
968 |
/*----------------------------------------------------------------------------------------------------------------------------*/ |
964 |
|
969 |
|
965 |
context = gtk_widget_get_style_context (widget); |
970 |
context = gtk_widget_get_style_context (widget); |
966 |
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &theme_fg); |
971 |
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &theme_fg); |
Lines 984-990
Link Here
|
984 |
vte_terminal_set_colors_rgba (VTE_TERMINAL (screen), &fg, &bg, |
989 |
vte_terminal_set_colors_rgba (VTE_TERMINAL (screen), &fg, &bg, |
985 |
colors, n_colors); |
990 |
colors, n_colors); |
986 |
vte_terminal_set_color_bold_rgba (VTE_TERMINAL (screen), boldp); |
991 |
vte_terminal_set_color_bold_rgba (VTE_TERMINAL (screen), boldp); |
|
|
992 |
vte_terminal_set_background_saturation (VTE_TERMINAL (screen), 1.0 - bg.alpha); /* normal color */ |
993 |
vte_terminal_set_opacity (VTE_TERMINAL (screen), bg.alpha * 0xffff); |
987 |
g_free (colors); |
994 |
g_free (colors); |
|
|
995 |
|
996 |
/*------ CSS ---------------------------------------------------------------------------------------------------------------*/ |
997 |
provider = gtk_css_provider_new (); |
998 |
display = gdk_display_get_default (); |
999 |
gdkscreen = gdk_display_get_default_screen (display); |
1000 |
|
1001 |
gtk_style_context_add_provider_for_screen (gdkscreen, |
1002 |
GTK_STYLE_PROVIDER (provider), |
1003 |
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
1004 |
|
1005 |
gtk_css_provider_load_from_data (GTK_CSS_PROVIDER(provider), |
1006 |
bg.alpha < 1 ? " TerminalWindow {\n" |
1007 |
" background-color: transparent;\n" /* transparent background */ |
1008 |
"}\n" |
1009 |
" TerminalWindow .menubar {\n" |
1010 |
" background-color: @theme_bg_color;\n" /* fix transparent menubar */ |
1011 |
"}\n" : " TerminalWindow {\n" |
1012 |
" background-color: @theme_bg_color;\n" /* opaque background */ |
1013 |
"}\n", -1, NULL); |
1014 |
g_object_unref (provider); |
1015 |
/*----------------------------------------------------------------------------------------------------------------------------*/ |
988 |
} |
1016 |
} |
989 |
|
1017 |
|
990 |
void |
1018 |
void |