Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 500636
Collapse All | Expand All

(-)gnome-terminal-3.10.2/src/profile-preferences.ui (+1 lines)
Lines 1088-1093 Link Here
1088
                                        <property name="can_focus">True</property>
1088
                                        <property name="can_focus">True</property>
1089
                                        <property name="receives_default">False</property>
1089
                                        <property name="receives_default">False</property>
1090
                                        <property name="title" translatable="yes">Choose Terminal Background Color</property>
1090
                                        <property name="title" translatable="yes">Choose Terminal Background Color</property>
1091
                                        <property name="use_alpha">True</property>
1091
                                      </object>
1092
                                      </object>
1092
                                      <packing>
1093
                                      <packing>
1093
                                        <property name="left_attach">1</property>
1094
                                        <property name="left_attach">1</property>
(-)gnome-terminal-3.10.2/src/terminal-screen.c (+28 lines)
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
(-)gnome-terminal-3.10.2/src/terminal-window.c (+8 lines)
Lines 1424-1432 Link Here
1424
{
1424
{
1425
  TerminalWindow *window = TERMINAL_WINDOW (widget);
1425
  TerminalWindow *window = TERMINAL_WINDOW (widget);
1426
  TerminalWindowPrivate *priv = window->priv;
1426
  TerminalWindowPrivate *priv = window->priv;
1427
  GdkScreen *screen;
1428
  GdkVisual *visual;
1427
  GtkAllocation widget_allocation;
1429
  GtkAllocation widget_allocation;
1428
1430
1429
  gtk_widget_get_allocation (widget, &widget_allocation);
1431
  gtk_widget_get_allocation (widget, &widget_allocation);
1432
  screen = gtk_widget_get_screen (widget);
1433
  /* Set RGBA visual if possible so VTE can use real transparency */
1434
  visual = gdk_screen_get_rgba_visual (screen);
1435
  if (visual == NULL)
1436
    visual = gdk_screen_get_system_visual (screen);    
1437
  gtk_widget_set_visual (widget, visual);
1430
1438
1431
  _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY,
1439
  _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY,
1432
                         "[window %p] realize, size %d : %d at (%d, %d)\n",
1440
                         "[window %p] realize, size %d : %d at (%d, %d)\n",

Return to bug 500636