~larsu/gtk/dialog-titlebars

« back to all changes in this revision

Viewing changes to debian/patches/git_grid_theming.patch

  • Committer: Sebastien Bacher
  • Date: 2014-03-06 14:09:33 UTC
  • Revision ID: seb128@ubuntu.com-20140306140933-5l5ynzow4fugjr3u
* debian/patches/git_grid_theming.patch:
  - "grid: draw css background and borders", that's needed to be able to
    workraround background color issues with our scrollbars/theme,
    thanks Lars Uebernickel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 144a92ef114489979b7261cfa057901d0cd9ebaf Mon Sep 17 00:00:00 2001
 
2
From: Paolo Borelli <pborelli@gnome.org>
 
3
Date: Sat, 02 Nov 2013 11:21:51 +0000
 
4
Subject: grid: draw css background and borders
 
5
 
 
6
https://bugzilla.gnome.org/show_bug.cgi?id=711324
 
7
---
 
8
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
 
9
index 7e7f7a7..23cbc53 100644
 
10
--- a/gtk/gtkgrid.c
 
11
+++ b/gtk/gtkgrid.c
 
12
@@ -1682,6 +1682,22 @@ gtk_grid_size_allocate (GtkWidget     *widget,
 
13
   gtk_grid_request_allocate_children (&request);
 
14
 }
 
15
 
 
16
+static gboolean
 
17
+gtk_grid_draw (GtkWidget *widget,
 
18
+               cairo_t   *cr)
 
19
+{
 
20
+  GtkStyleContext *context;
 
21
+  GtkAllocation allocation;
 
22
+
 
23
+  context = gtk_widget_get_style_context (widget);
 
24
+  gtk_widget_get_allocation (widget, &allocation);
 
25
+
 
26
+  gtk_render_background (context, cr, 0, 0, allocation.width, allocation.height);
 
27
+  gtk_render_frame (context, cr, 0, 0, allocation.width, allocation.height);
 
28
+
 
29
+  return GTK_WIDGET_CLASS (gtk_grid_parent_class)->draw (widget, cr);
 
30
+}
 
31
+
 
32
 static void
 
33
 gtk_grid_class_init (GtkGridClass *class)
 
34
 {
 
35
@@ -1699,6 +1715,7 @@ gtk_grid_class_init (GtkGridClass *class)
 
36
   widget_class->get_preferred_width_for_height = gtk_grid_get_preferred_width_for_height;
 
37
   widget_class->get_preferred_height_for_width = gtk_grid_get_preferred_height_for_width;
 
38
   widget_class->get_preferred_height_and_baseline_for_width = gtk_grid_get_preferred_height_and_baseline_for_width;
 
39
+  widget_class->draw = gtk_grid_draw;
 
40
 
 
41
   container_class->add = gtk_grid_add;
 
42
   container_class->remove = gtk_grid_remove;
 
43
--
 
44
cgit v0.9.2
 
45