Merge lp:~larsu/gnome-system-monitor/draw-graph-transparent-background into lp:~ubuntu-desktop/gnome-system-monitor/ubuntu

Proposed by Lars Karlitski
Status: Merged
Merged at revision: 61
Proposed branch: lp:~larsu/gnome-system-monitor/draw-graph-transparent-background
Merge into: lp:~ubuntu-desktop/gnome-system-monitor/ubuntu
Diff against target: 64 lines (+44/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/git_draw-transparent-background.patch (+37/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~larsu/gnome-system-monitor/draw-graph-transparent-background
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+236857@code.launchpad.net

Commit message

Add git_draw-transparent-background.patch

Description of the change

Add git_draw-transparent-background.patch

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-04-29 19:17:25 +0000
3+++ debian/changelog 2014-10-02 11:34:50 +0000
4@@ -1,3 +1,9 @@
5+gnome-system-monitor (3.8.0-0ubuntu3) UNRELEASED; urgency=medium
6+
7+ * Add git_draw-transparent-background.patch
8+
9+ -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Thu, 02 Oct 2014 13:31:52 +0200
10+
11 gnome-system-monitor (3.8.0-0ubuntu2) saucy; urgency=low
12
13 * Add 00git_logind_check.patch: Fix check for logind.
14
15=== added file 'debian/patches/git_draw-transparent-background.patch'
16--- debian/patches/git_draw-transparent-background.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/git_draw-transparent-background.patch 2014-10-02 11:34:50 +0000
18@@ -0,0 +1,37 @@
19+Description: Draw graphs with transparent background
20+
21+Backport from upstream 6da63ee
22+
23+--- gnome-system-monitor-3.8.0.orig/src/load-graph.cpp
24++++ gnome-system-monitor-3.8.0/src/load-graph.cpp
25+@@ -76,7 +76,7 @@ void draw_background(LoadGraph *graph) {
26+ PangoLayout* layout;
27+ PangoFontDescription* font_desc;
28+ PangoRectangle extents;
29+- GdkRGBA fg, bg;
30++ GdkRGBA fg;
31+
32+ num_bars = graph->num_bars();
33+ graph->graph_dely = (graph->draw_height - 15) / num_bars; /* round to int to avoid AA blur */
34+@@ -86,19 +86,15 @@ void draw_background(LoadGraph *graph) {
35+
36+ gtk_widget_get_allocation (graph->disp, &allocation);
37+ graph->background = gdk_window_create_similar_surface (gtk_widget_get_window (graph->disp),
38+- CAIRO_CONTENT_COLOR,
39++ CAIRO_CONTENT_COLOR_ALPHA,
40+ allocation.width,
41+ allocation.height);
42+ cr = cairo_create (graph->background);
43+
44+ GtkStyleContext *context = gtk_widget_get_style_context (ProcmanApp::get()->notebook);
45+- gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg);
46+ gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fg);
47+
48+- // set the background colour
49+- gdk_cairo_set_source_rgba (cr, &bg);
50+- cairo_paint (cr);
51+-
52++ cairo_paint_with_alpha (cr, 0.0);
53+ layout = pango_cairo_create_layout (cr);
54+ font_desc = pango_font_description_copy (gtk_style_context_get_font (context, GTK_STATE_FLAG_NORMAL));
55+ pango_font_description_set_size (font_desc, 0.8 * graph->fontsize * PANGO_SCALE);
56
57=== modified file 'debian/patches/series'
58--- debian/patches/series 2013-04-29 19:13:35 +0000
59+++ debian/patches/series 2014-10-02 11:34:50 +0000
60@@ -1,3 +1,4 @@
61 # Debian patches for gnome-system-monitor
62 00git_logind_check.patch
63 quit-accel-fix
64+git_draw-transparent-background.patch

Subscribers

People subscribed via source and target branches