blob: 296a80e40b41644bd549468a169c281f9d115dd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
--- gtk+-1.2.6/gtk/gtkmenubar.c.noborder Tue Feb 1 02:41:57 2000
+++ gtk+-1.2.6/gtk/gtkmenubar.c Tue Feb 1 02:42:11 2000
@@ -217,6 +217,8 @@
GList *children;
gint nchildren;
GtkRequisition child_requisition;
+ gint xthickness;
+ gint ythickness;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_MENU_BAR (widget));
@@ -256,12 +258,21 @@
}
}
+ if (menu_bar->shadow_type == GTK_SHADOW_NONE)
+ {
+ xthickness = 0;
+ ythickness = 0;
+ }
+ else
+ {
+ xthickness = widget->style->klass->xthickness;
+ ythickness = widget->style->klass->ythickness;
+ }
+
requisition->width += (GTK_CONTAINER (menu_bar)->border_width +
- widget->style->klass->xthickness +
- BORDER_SPACING) * 2;
+ xthickness + BORDER_SPACING) * 2;
requisition->height += (GTK_CONTAINER (menu_bar)->border_width +
- widget->style->klass->ythickness +
- BORDER_SPACING) * 2;
+ ythickness + BORDER_SPACING) * 2;
if (nchildren > 0)
requisition->width += 2 * CHILD_SPACING * (nchildren - 1);
@@ -279,6 +290,8 @@
GtkAllocation child_allocation;
GtkRequisition child_requisition;
guint offset;
+ gint xthickness;
+ gint ythickness;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_MENU_BAR (widget));
@@ -295,14 +308,23 @@
if (menu_shell->children)
{
+ if (menu_bar->shadow_type == GTK_SHADOW_NONE)
+ {
+ xthickness = 0;
+ ythickness = 0;
+ }
+ else
+ {
+ xthickness = widget->style->klass->xthickness;
+ ythickness = widget->style->klass->ythickness;
+ }
+
child_allocation.x = (GTK_CONTAINER (menu_bar)->border_width +
- widget->style->klass->xthickness +
- BORDER_SPACING);
+ xthickness + BORDER_SPACING);
offset = child_allocation.x; /* Window edge to menubar start */
child_allocation.y = (GTK_CONTAINER (menu_bar)->border_width +
- widget->style->klass->ythickness +
- BORDER_SPACING);
+ ythickness + BORDER_SPACING);
child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
children = menu_shell->children;
|