From 3f416961dce399d3a959f316d998ae97b8ece284 Mon Sep 17 00:00:00 2001 From: Raymond Penners Date: Tue, 5 Aug 2003 19:55:33 +0000 Subject: [PATCH] Text entry --- modules/engines/ms-windows/ChangeLog.old | 3 +- modules/engines/ms-windows/wimp_style.c | 35 +++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/modules/engines/ms-windows/ChangeLog.old b/modules/engines/ms-windows/ChangeLog.old index dbadd5a345..9db158e16f 100755 --- a/modules/engines/ms-windows/ChangeLog.old +++ b/modules/engines/ms-windows/ChangeLog.old @@ -3,7 +3,8 @@ * src/xp_theme.c: Internal redesign: extracted XP specific theming from wimp_style.c, improved code. - * src/wimp_style.c: Added XP theming support for list headers. + * src/wimp_style.c: Added XP theming support for list headers, and + entry widgets. 2003-08-03 Raymond Penners diff --git a/modules/engines/ms-windows/wimp_style.c b/modules/engines/ms-windows/wimp_style.c index 4e71a21b12..844d96af6c 100755 --- a/modules/engines/ms-windows/wimp_style.c +++ b/modules/engines/ms-windows/wimp_style.c @@ -1081,6 +1081,39 @@ draw_flat_box (GtkStyle *style, GdkWindow *window, area, widget, detail, x, y, width, height); } + +static void +draw_shadow (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) +{ + if(detail && ! strcmp(detail, "entry")) + { + /* Is this necessary? + if(GTK_IS_COMBO(widget->parent)) + width += 10; + if(GTK_WIDGET_HAS_FOCUS (widget)) + state_type = GTK_STATE_PRELIGHT; + */ + if (xp_theme_draw(window, XP_THEME_ELEMENT_EDIT_TEXT, style, + x, y, width, height, state_type)) + { + return; + } + } + parent_class->draw_shadow (style, window, state_type, shadow_type, area, widget, + detail, x, y, width, height); +} + + static void wimp_style_init_from_rc (GtkStyle * style, GtkRcStyle * rc_style) { @@ -1092,7 +1125,6 @@ wimp_style_init_from_rc (GtkStyle * style, GtkRcStyle * rc_style) static void wimp_style_init (WimpStyle * style) { - // uxtheme_dll = LoadLibrary("uxtheme.dll"); xp_theme_init (); } @@ -1113,6 +1145,7 @@ wimp_style_class_init (WimpStyleClass *klass) style_class->draw_expander = draw_expander; style_class->draw_extension = draw_extension; style_class->draw_box_gap = draw_box_gap; + style_class->draw_shadow = draw_shadow; } GType wimp_type_style = 0;