1 --- gtk+-2.6.4/gtk/gtkframe.c 2004-08-17 22:10:24.000000000 +0300
2 +++ gtk+-2.6.4/gtk/gtkframe.c 2005-04-06 16:19:36.583976752 +0300
4 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
7 +/* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list
17 #define LABEL_SIDE_PAD 2
18 +#define FRAME_BORDER_WIDTH 3
23 P_("A widget to display in place of the usual frame label"),
25 G_PARAM_READABLE | G_PARAM_WRITABLE));
27 + /* draw hildonlike frame */
28 + gtk_widget_class_install_style_property (widget_class,
29 + g_param_spec_boolean ("hildonlike",
30 + _("hildonlike looks"),
31 + _("Draw frame, 1/0"),
35 widget_class->expose_event = gtk_frame_expose;
36 widget_class->size_request = gtk_frame_size_request;
39 gtk_frame_new (const gchar *label)
41 - return g_object_new (GTK_TYPE_FRAME, "label", label, NULL);
42 + return g_object_new (GTK_TYPE_FRAME, "label", label, "border-width", FRAME_BORDER_WIDTH, NULL);
49 gint x, y, width, height;
50 + gboolean hildonlike;
52 + gtk_widget_style_get ( widget, "hildonlike", &hildonlike, NULL );
54 if (GTK_WIDGET_DRAWABLE (widget))
57 width = frame->child_allocation.width + 2 * widget->style->xthickness;
58 height = frame->child_allocation.height + 2 * widget->style->ythickness;
60 - if (frame->label_widget)
62 + /* draw hildon application borders */
63 + gtk_paint_box (widget->style,
65 + GTK_WIDGET_STATE( widget ),
67 + NULL, widget, "frame",
68 + x, y, width, height);
70 + else if (frame->label_widget)
72 GtkRequisition child_requisition;
76 if (GTK_WIDGET_DRAWABLE (widget))
78 - gtk_frame_paint (widget, &event->area);
79 + gtk_frame_paint (widget, &event->area);
81 (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);