summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorLars Hamann <lars@gtk.org>1998-11-11 23:40:17 +0000
committerLars Hamann <lars@src.gnome.org>1998-11-11 23:40:17 +0000
commitb214f7e59e58969d6640b7920c01a2c6b5aeba0b (patch)
tree4d95f3a17b0a0517ddf73602595772c74d449f85 /gtk/gtkstyle.c
parentf164436f8695f8994b9a73cf82869ce01ad10eb6 (diff)
downloadgtk+-b214f7e59e58969d6640b7920c01a2c6b5aeba0b.tar.gz
use GtkPositionType defines.
Thu Nov 12 00:26:13 1998 Lars Hamann <lars@gtk.org> * gtk/gtkstyle.c (gtk_default_draw_box_gap): use GtkPositionType defines. * gtk/gtknotebook.c (gtk_notebook_draw_tab): fixed gap_side for GTP_POS_RIGHT
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 8f4fc5f614..07e2ee743a 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -2613,9 +2613,9 @@ gtk_default_draw_box_gap (GtkStyle *style,
case GTK_SHADOW_OUT:
case GTK_SHADOW_ETCHED_IN:
case GTK_SHADOW_ETCHED_OUT:
- if (gap_side == 0)
- /* top */
+ switch (gap_side)
{
+ case GTK_POS_TOP:
gdk_draw_line (window, gc1,
x, y, x, y + height - 1);
gdk_draw_line (window, gc2,
@@ -2647,10 +2647,8 @@ gtk_default_draw_box_gap (GtkStyle *style,
gdk_draw_line (window, gc2,
x + gap_x + gap_width - 1, y, x + gap_x + gap_width - 1, y);
}
- }
- else if (gap_side == 1)
- /* bottom */
- {
+ break;
+ case GTK_POS_BOTTOM:
gdk_draw_line (window, gc1,
x, y, x + width - 1, y);
gdk_draw_line (window, gc1,
@@ -2682,10 +2680,8 @@ gtk_default_draw_box_gap (GtkStyle *style,
gdk_draw_line (window, gc3,
x + gap_x + gap_width - 1, y + height - 1, x + gap_x + gap_width - 1, y + height - 1);
}
- }
- else if (gap_side == 2)
- /* left */
- {
+ break;
+ case GTK_POS_LEFT:
gdk_draw_line (window, gc1,
x, y, x + width - 1, y);
gdk_draw_line (window, gc2,
@@ -2717,10 +2713,8 @@ gtk_default_draw_box_gap (GtkStyle *style,
gdk_draw_line (window, gc2,
x, y + gap_x + gap_width - 1, x, y + gap_x + gap_width - 1);
}
- }
- else if (gap_side == 3)
- /* right */
- {
+ break;
+ case GTK_POS_RIGHT:
gdk_draw_line (window, gc1,
x, y, x + width - 1, y);
gdk_draw_line (window, gc1,
@@ -2752,6 +2746,7 @@ gtk_default_draw_box_gap (GtkStyle *style,
gdk_draw_line (window, gc3,
x + width - 1, y + gap_x + gap_width - 1, x + width - 1, y + gap_x + gap_width - 1);
}
+ break;
}
}
if (area)