summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2006-04-01 16:28:00 +0000
committerDom Lachowicz <doml@src.gnome.org>2006-04-01 16:28:00 +0000
commit68d222c7573221cd40d912c5a35f616eb3eb4818 (patch)
treeab71b88d636b64e521b4a13d8204e280b693707d /modules
parent37d5b4147af78ef190ebc6b77430630089a667aa (diff)
downloadgtk+-68d222c7573221cd40d912c5a35f616eb3eb4818.tar.gz
Emulate WinXP's drawing of menu separators
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/engines/ms-windows/Theme/gtk-2.0/gtkrc5
-rwxr-xr-xmodules/engines/ms-windows/msw_style.c14
2 files changed, 17 insertions, 2 deletions
diff --git a/modules/engines/ms-windows/Theme/gtk-2.0/gtkrc b/modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
index f16082e42f..39f2a7b14c 100755
--- a/modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
+++ b/modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
@@ -34,9 +34,10 @@ style "msw-default"
GtkScrolledWindow::scrollbar_spacing = 1
+ GtkSeparatorMenuItem::horizontal-padding = 2
+
engine "wimp"
{
}
}
-class "*" style "msw-default"
-
+class "*" style "msw-default" \ No newline at end of file
diff --git a/modules/engines/ms-windows/msw_style.c b/modules/engines/ms-windows/msw_style.c
index 7482626971..fdcf99ae32 100755
--- a/modules/engines/ms-windows/msw_style.c
+++ b/modules/engines/ms-windows/msw_style.c
@@ -2373,8 +2373,22 @@ draw_hline (GtkStyle * style,
GtkWidget * widget,
const gchar * detail, gint x1, gint x2, gint y)
{
+ if (xp_theme_is_active () && detail && !strcmp(detail, "menuitem")) {
+ if(xp_theme_draw (window, XP_THEME_ELEMENT_MENU_SEPARATOR, style, x1, y, x2, 1, state_type, area))
+ return;
+ else {
+ if (area)
+ gdk_gc_set_clip_rectangle (style->dark_gc[state_type], area);
+
+ gdk_draw_line (window, style->dark_gc[state_type], x1, y, x2, y);
+
+ if (area)
+ gdk_gc_set_clip_rectangle (style->dark_gc[state_type], NULL);
+ }
+ } else {
parent_class->draw_hline (style, window, state_type, area, widget,
detail, x1, x2, y);
+ }
}
static void