1 Index: gtk/gtkcombobox.c
2 ===================================================================
3 RCS file: /cvs/gnome/gtk+/gtk/gtkcombobox.c,v
4 retrieving revision 1.185
5 diff -u -p -r1.185 gtkcombobox.c
6 --- gtk/gtkcombobox.c 12 Oct 2006 13:48:07 -0000 1.185
7 +++ gtk/gtkcombobox.c 1 Nov 2006 19:01:09 -0000
8 @@ -756,6 +756,25 @@ gtk_combo_box_class_init (GtkComboBoxCla
13 + * GtkComboBox:arrow-size:
15 + * Sets the minimum size of the arrow in the combo box. Note
16 + * that the arrow size is coupled to the font size, so in case
17 + * a larger font is used, the arrow will be larger than set
22 + gtk_widget_class_install_style_property (widget_class,
23 + g_param_spec_int ("arrow-size",
25 + P_("The minimum size of the arrow in the combo box"),
29 + GTK_PARAM_READABLE));
31 g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
34 @@ -1897,7 +1916,12 @@ gtk_combo_box_size_request (GtkWidget
37 gint focus_width, focus_pad;
40 GtkRequisition bin_req;
41 + PangoContext *context;
42 + PangoFontMetrics *metrics;
43 + PangoFontDescription *font_desc;
45 GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
47 @@ -1910,7 +1934,20 @@ gtk_combo_box_size_request (GtkWidget
48 gtk_widget_style_get (GTK_WIDGET (widget),
49 "focus-line-width", &focus_width,
50 "focus-padding", &focus_pad,
51 + "arrow-size", &arrow_size,
54 + font_desc = GTK_BIN (widget)->child->style->font_desc;
55 + context = gtk_widget_get_pango_context (widget);
56 + metrics = pango_context_get_metrics (context, font_desc,
57 + pango_context_get_language (context));
58 + font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
59 + pango_font_metrics_get_descent (metrics));
60 + pango_font_metrics_unref (metrics);
62 + arrow_size = MAX (arrow_size, font_size);
64 + gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size);
66 if (!combo_box->priv->tree_view)