Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 369822 Details for
Bug 500636
>=x11-terms/gnome-terminal-3.8 transparent background
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gnome-terminal-3.10 patch
opacity-3.10.patch (text/plain), 4.05 KB, created by
aj2r
on 2014-02-07 18:30:38 UTC
(
hide
)
Description:
gnome-terminal-3.10 patch
Filename:
MIME Type:
Creator:
aj2r
Created:
2014-02-07 18:30:38 UTC
Size:
4.05 KB
patch
obsolete
>--- gnome-terminal-3.10.2/src/profile-preferences.ui 2013-11-11 21:36:27.000000000 +0100 >+++ gnome-terminal-transparent-3.10.2/src/profile-preferences.ui 2014-02-07 17:18:00.191819933 +0100 >@@ -1088,6 +1088,7 @@ > <property name="can_focus">True</property> > <property name="receives_default">False</property> > <property name="title" translatable="yes">Choose Terminal Background Color</property> >+ <property name="use_alpha">True</property> > </object> > <packing> > <property name="left_attach">1</property> > >--- gnome-terminal-3.10.2/src/terminal-screen.c 2013-11-11 21:36:28.000000000 +0100 >+++ gnome-terminal-transparent-3.10.2/src/terminal-screen.c 2014-02-07 19:05:54.959169779 +0100 >@@ -961,6 +961,11 @@ > GdkRGBA fg, bg, bold, theme_fg, theme_bg; > GdkRGBA *boldp; > GtkStyleContext *context; >+ /*------ CSS ---------------------------------------------------------------------------------------------------------------*/ >+ GtkCssProvider *provider; >+ GdkDisplay *display; >+ GdkScreen *gdkscreen; >+ /*----------------------------------------------------------------------------------------------------------------------------*/ > > context = gtk_widget_get_style_context (widget); > gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &theme_fg); >@@ -984,7 +989,30 @@ > vte_terminal_set_colors_rgba (VTE_TERMINAL (screen), &fg, &bg, > colors, n_colors); > vte_terminal_set_color_bold_rgba (VTE_TERMINAL (screen), boldp); >+ vte_terminal_set_background_saturation (VTE_TERMINAL (screen), 1.0 - bg.alpha); /* normal color */ >+ vte_terminal_set_opacity (VTE_TERMINAL (screen), bg.alpha * 0xffff); > g_free (colors); >+ >+ /*------ CSS ---------------------------------------------------------------------------------------------------------------*/ >+ provider = gtk_css_provider_new (); >+ display = gdk_display_get_default (); >+ gdkscreen = gdk_display_get_default_screen (display); >+ >+ gtk_style_context_add_provider_for_screen (gdkscreen, >+ GTK_STYLE_PROVIDER (provider), >+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); >+ >+ gtk_css_provider_load_from_data (GTK_CSS_PROVIDER(provider), >+ bg.alpha < 1 ? " TerminalWindow {\n" >+ " background-color: transparent;\n" /* transparent background */ >+ "}\n" >+ " TerminalWindow .menubar {\n" >+ " background-color: @theme_bg_color;\n" /* fix transparent menubar */ >+ "}\n" : " TerminalWindow {\n" >+ " background-color: @theme_bg_color;\n" /* opaque background */ >+ "}\n", -1, NULL); >+ g_object_unref (provider); >+ /*----------------------------------------------------------------------------------------------------------------------------*/ > } > > void > >--- gnome-terminal-3.10.2/src/terminal-window.c 2013-11-11 21:36:28.000000000 +0100 >+++ gnome-terminal-transparent-3.10.2/src/terminal-window.c 2014-02-06 18:50:06.995987510 +0100 >@@ -1424,9 +1424,17 @@ > { > TerminalWindow *window = TERMINAL_WINDOW (widget); > TerminalWindowPrivate *priv = window->priv; >+ GdkScreen *screen; >+ GdkVisual *visual; > GtkAllocation widget_allocation; > > gtk_widget_get_allocation (widget, &widget_allocation); >+ screen = gtk_widget_get_screen (widget); >+ /* Set RGBA visual if possible so VTE can use real transparency */ >+ visual = gdk_screen_get_rgba_visual (screen); >+ if (visual == NULL) >+ visual = gdk_screen_get_system_visual (screen); >+ gtk_widget_set_visual (widget, visual); > > _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY, > "[window %p] realize, size %d : %d at (%d, %d)\n", >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 500636
: 369822