diff options
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff new file mode 100644 index 0000000000..6ca54c0c99 --- /dev/null +++ b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/gtkframe.c.diff | |||
@@ -0,0 +1,82 @@ | |||
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 | ||
3 | @@ -24,6 +24,10 @@ | ||
4 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. | ||
5 | */ | ||
6 | |||
7 | +/* Modified for Nokia Oyj during 2002-2003. See CHANGES file for list | ||
8 | + * of changes. | ||
9 | + */ | ||
10 | + | ||
11 | #include <config.h> | ||
12 | #include <string.h> | ||
13 | #include "gtkalias.h" | ||
14 | @@ -33,6 +37,7 @@ | ||
15 | |||
16 | #define LABEL_PAD 1 | ||
17 | #define LABEL_SIDE_PAD 2 | ||
18 | +#define FRAME_BORDER_WIDTH 3 | ||
19 | |||
20 | enum { | ||
21 | PROP_0, | ||
22 | @@ -172,6 +177,14 @@ | ||
23 | P_("A widget to display in place of the usual frame label"), | ||
24 | GTK_TYPE_WIDGET, | ||
25 | G_PARAM_READABLE | G_PARAM_WRITABLE)); | ||
26 | + | ||
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"), | ||
32 | + FALSE, | ||
33 | + G_PARAM_READABLE)); | ||
34 | |||
35 | widget_class->expose_event = gtk_frame_expose; | ||
36 | widget_class->size_request = gtk_frame_size_request; | ||
37 | @@ -276,7 +289,7 @@ | ||
38 | GtkWidget* | ||
39 | gtk_frame_new (const gchar *label) | ||
40 | { | ||
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); | ||
43 | } | ||
44 | |||
45 | static void | ||
46 | @@ -533,6 +546,9 @@ | ||
47 | { | ||
48 | GtkFrame *frame; | ||
49 | gint x, y, width, height; | ||
50 | + gboolean hildonlike; | ||
51 | + | ||
52 | + gtk_widget_style_get ( widget, "hildonlike", &hildonlike, NULL ); | ||
53 | |||
54 | if (GTK_WIDGET_DRAWABLE (widget)) | ||
55 | { | ||
56 | @@ -543,7 +559,16 @@ | ||
57 | width = frame->child_allocation.width + 2 * widget->style->xthickness; | ||
58 | height = frame->child_allocation.height + 2 * widget->style->ythickness; | ||
59 | |||
60 | - if (frame->label_widget) | ||
61 | + if (hildonlike) { | ||
62 | + /* draw hildon application borders */ | ||
63 | + gtk_paint_box (widget->style, | ||
64 | + widget->window, | ||
65 | + GTK_WIDGET_STATE( widget ), | ||
66 | + GTK_SHADOW_OUT, | ||
67 | + NULL, widget, "frame", | ||
68 | + x, y, width, height); | ||
69 | + } | ||
70 | + else if (frame->label_widget) | ||
71 | { | ||
72 | GtkRequisition child_requisition; | ||
73 | gfloat xalign; | ||
74 | @@ -586,7 +611,7 @@ | ||
75 | { | ||
76 | if (GTK_WIDGET_DRAWABLE (widget)) | ||
77 | { | ||
78 | - gtk_frame_paint (widget, &event->area); | ||
79 | + gtk_frame_paint (widget, &event->area); | ||
80 | |||
81 | (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); | ||
82 | } | ||