summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch69
1 files changed, 0 insertions, 69 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch b/meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch
deleted file mode 100644
index 62d23556a1..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.12.7/combo-arrow-size.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1Upstream-Status: Inappropriate [enable feature]
2
3Index: gtk/gtkcombobox.c
4===================================================================
5RCS file: /cvs/gnome/gtk+/gtk/gtkcombobox.c,v
6retrieving revision 1.185
7diff -u -p -r1.185 gtkcombobox.c
8--- gtk/gtkcombobox.c 12 Oct 2006 13:48:07 -0000 1.185
9+++ gtk/gtkcombobox.c 1 Nov 2006 19:01:09 -0000
10@@ -756,6 +756,25 @@ gtk_combo_box_class_init (GtkComboBoxCla
11 FALSE,
12 GTK_PARAM_READABLE));
13
14+ /**
15+ * GtkComboBox:arrow-size:
16+ *
17+ * Sets the minimum size of the arrow in the combo box. Note
18+ * that the arrow size is coupled to the font size, so in case
19+ * a larger font is used, the arrow will be larger than set
20+ * by arrow size.
21+ *
22+ * Since: 2.12
23+ */
24+ gtk_widget_class_install_style_property (widget_class,
25+ g_param_spec_int ("arrow-size",
26+ P_("Arrow Size"),
27+ P_("The minimum size of the arrow in the combo box"),
28+ 0,
29+ G_MAXINT,
30+ 15,
31+ GTK_PARAM_READABLE));
32+
33 g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
34 }
35
36@@ -1897,7 +1916,12 @@ gtk_combo_box_size_request (GtkWidget
37 {
38 gint width, height;
39 gint focus_width, focus_pad;
40+ gint font_size;
41+ gint arrow_size;
42 GtkRequisition bin_req;
43+ PangoContext *context;
44+ PangoFontMetrics *metrics;
45+ PangoFontDescription *font_desc;
46
47 GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
48
49@@ -1910,7 +1934,20 @@ gtk_combo_box_size_request (GtkWidget
50 gtk_widget_style_get (GTK_WIDGET (widget),
51 "focus-line-width", &focus_width,
52 "focus-padding", &focus_pad,
53+ "arrow-size", &arrow_size,
54 NULL);
55+
56+ font_desc = GTK_BIN (widget)->child->style->font_desc;
57+ context = gtk_widget_get_pango_context (widget);
58+ metrics = pango_context_get_metrics (context, font_desc,
59+ pango_context_get_language (context));
60+ font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
61+ pango_font_metrics_get_descent (metrics));
62+ pango_font_metrics_unref (metrics);
63+
64+ arrow_size = MAX (arrow_size, font_size);
65+
66+ gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size);
67
68 if (!combo_box->priv->tree_view)
69 {