+2007-12-28 Mathias Hasselmann <mathias@openismus.com>
+
+ Remove max_detail_height field from GtkCalendarPrivate. (#339540)
+
+ * gtk/gtkcalendar.c: Drop max_detail_height field, and use
+ a local variable instead in gtk_calendar_size_request.
+
2007-12-28 Matthias Clasen <mclasen@redhat.com>
* tests/defaultvaluetest.c: Add enough exclusions to make the
guint arrow_width;
guint max_month_width;
guint max_year_width;
- guint max_detail_height;
guint day_width;
guint week_width;
gint max_header_height = 0;
gint focus_width;
gint focus_padding;
-
+ gint max_detail_height;
+
gtk_widget_style_get (GTK_WIDGET (widget),
"focus-line-width", &focus_width,
"focus-padding", &focus_padding,
/* Calculate detail extents. Do this as late as possible since
* pango_layout_set_markup is called which alters font settings. */
- priv->max_detail_height = 0;
+ max_detail_height = 0;
if (priv->detail_func && (calendar->display_flags & GTK_CALENDAR_SHOW_DETAILS))
{
pango_layout_set_markup (layout, markup, -1);
pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
-
if (priv->detail_width_chars)
priv->min_day_width = MAX (priv->min_day_width, logical_rect.width);
if (priv->detail_height_rows)
- priv->max_detail_height = MAX (priv->max_detail_height, logical_rect.height);
+ max_detail_height = MAX (max_detail_height, logical_rect.height);
}
if (!priv->detail_width_chars || !priv->detail_height_rows)
if (!priv->detail_width_chars)
priv->min_day_width = MAX (priv->min_day_width, logical_rect.width);
if (!priv->detail_height_rows)
- priv->max_detail_height = MAX (priv->max_detail_height, logical_rect.height);
+ max_detail_height = MAX (max_detail_height, logical_rect.height);
g_free (markup);
}
priv->main_h = (CALENDAR_MARGIN + calendar_margin
+ 6 * (priv->max_day_char_ascent
+ priv->max_day_char_descent
- + priv->max_detail_height
+ + max_detail_height
+ 2 * (focus_padding + focus_width))
+ DAY_YSEP * 5);