[vte] app: Fix background image drawing
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] app: Fix background image drawing
- Date: Thu, 12 Nov 2020 21:53:44 +0000 (UTC)
commit 79e40dd5387a6a54ce418a082a4ebb6eaf60b20e
Author: Christian Persch <chpe src gnome org>
Date: Thu Nov 12 22:53:36 2020 +0100
app: Fix background image drawing
Use the option's background alpha value, *not* the value retrieved from
vte_terminal_get_color_background_for_draw() since that is set to zero
in this case.
Fixes a regression from commit eb85292b3ef44ac95d3863af68b19f6a8d8131e2.
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/301
src/app/app.cc | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/app/app.cc b/src/app/app.cc
index 7c23c273..789bce7d 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -454,6 +454,17 @@ public:
return alpha;
}
+ double get_alpha_bg_for_draw() const
+ {
+ double alpha;
+ if (whole_window_transparent)
+ alpha = 1.0;
+ else
+ alpha = get_alpha();
+
+ return alpha;
+ }
+
GdkRGBA get_color_bg() const
{
GdkRGBA color{bg_color};
@@ -1041,7 +1052,7 @@ vteapp_terminal_draw(GtkWidget* widget,
cairo_paint(cr);
cairo_pop_group_to_source(cr);
- cairo_paint_with_alpha(cr, bg.alpha);
+ cairo_paint_with_alpha(cr, options.get_alpha_bg_for_draw());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]