summaryrefslogtreecommitdiff
blob: 3f0249f23110c12b19faf16f01ed562b9296d2db (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
diff -U3 -r fvwm/fvwm/menus.c fvwm/fvwm/menus.c
--- fvwm/fvwm/menus.c	2008-03-18 13:17:40.000000000 +0100
+++ fvwm/fvwm/menus.c	2008-04-16 22:40:48.000000000 +0200
@@ -1644,7 +1644,8 @@
 		else if (MI_IS_SEPARATOR(mi))
 		{
 			/* Separator */
-			MI_HEIGHT(mi) = separator_height;
+			MI_HEIGHT(mi) = separator_height +
+				MST_VERTICAL_SEPARATOR_MARGIN_TOP(msp->menu);
 		}
 		else if (MI_IS_TEAR_OFF_BAR(mi))
 		{
@@ -1716,6 +1717,13 @@
 			}
 		}
 		y += MI_HEIGHT(mi);
+		/* Adds the separator magin below the current element
+		if it's a separator, but also if it's a title element,
+		not sure if this is always desiderable though...*/
+		if (MI_IS_SEPARATOR(mi) || MI_IS_TITLE(mi))
+		{
+			y += MST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(msp->menu);
+		}
 		/* this item would have to be the last item, or else
 		 * we need to add a "More..." entry pointing to a new menu */
 		menu_height =
diff -U3 -r fvwm/fvwm/menustyle.c fvwm/fvwm/menustyle.c
--- fvwm/fvwm/menustyle.c	2008-03-17 00:01:03.000000000 +0100
+++ fvwm/fvwm/menustyle.c	2008-04-16 21:20:47.000000000 +0200
@@ -427,7 +427,7 @@
 		"TrianglesUseFore",
 		"TitleColorset", "HilightTitleBack",
 		"TitleFont",
-		"VerticalMargins",
+		"VerticalMargins", "VerticalSeparatorMargins",
 		NULL
 	};
 
@@ -983,6 +983,8 @@
 			/* common settings */
 			ST_VERTICAL_MARGIN_TOP(tmpms) = 0;
 			ST_VERTICAL_MARGIN_BOTTOM(tmpms) = 0;
+			ST_VERTICAL_SEPARATOR_MARGIN_TOP(tmpms) = 0;
+			ST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(tmpms) = 0;
 			ST_CSET_MENU(tmpms) = 0;
 			ST_HAS_MENU_CSET(tmpms) = 0;
 			ST_CSET_ACTIVE(tmpms) = 0;
@@ -1597,6 +1599,12 @@
 				&ST_VERTICAL_MARGIN_BOTTOM(tmpms),
 				0, 0);
 			break;
+		case 63: /* VerticalSeparatorMargins */
+			parse_vertical_margins_line(
+				args, &ST_VERTICAL_SEPARATOR_MARGIN_TOP(tmpms),
+				&ST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(tmpms),
+				0, 0);
+			break;
 
 #if 0
 		case 99: /* PositionHints */
@@ -1775,6 +1783,9 @@
 	/* VerticalMargins */
 	ST_VERTICAL_MARGIN_TOP(destms) = ST_VERTICAL_MARGIN_TOP(origms);
 	ST_VERTICAL_MARGIN_BOTTOM(destms) = ST_VERTICAL_MARGIN_BOTTOM(origms);
+	/* VerticalSeparatorMargins */
+	ST_VERTICAL_SEPARATOR_MARGIN_TOP(destms) = ST_VERTICAL_SEPARATOR_MARGIN_TOP(origms);
+	ST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(destms) = ST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(origms);
 
 	/* SidePic */
 	if (ST_SIDEPIC(destms))
diff -U3 -r fvwm/fvwm/menustyle.h fvwm/fvwm/menustyle.h
--- fvwm/fvwm/menustyle.h	2008-03-17 00:01:03.000000000 +0100
+++ fvwm/fvwm/menustyle.h	2008-04-16 21:17:06.000000000 +0200
@@ -177,6 +177,10 @@
 #define MST_VERTICAL_MARGIN_TOP(m)	  ((m)->s->ms->look.vertical_margins.top)
 #define ST_VERTICAL_MARGIN_BOTTOM(s)  ((s)->look.vertical_margins.bottom)
 #define MST_VERTICAL_MARGIN_BOTTOM(m)	((m)->s->ms->look.vertical_margins.bottom)
+#define ST_VERTICAL_SEPARATOR_MARGIN_TOP(s)     ((s)->look.vertical_separator_margins.top)
+#define MST_VERTICAL_SEPARATOR_MARGIN_TOP(m)    ((m)->s->ms->look.vertical_separator_margins.top)
+#define ST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(s)  ((s)->look.vertical_separator_margins.bottom)
+#define MST_VERTICAL_SEPARATOR_MARGIN_BOTTOM(m) ((m)->s->ms->look.vertical_separator_margins.bottom)
 
 /* ---------------------------- type definitions --------------------------- */
 
@@ -299,6 +303,11 @@
 	} vertical_margins;
 	struct
 	{
+		unsigned char top;
+		unsigned char bottom;
+	} vertical_separator_margins;
+	struct
+	{
 		int menu;
 		int active;
 		int greyed;