From 5be8bc64abeef5279a06b492f0e9a8cdd141e188 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 10 Oct 2006 05:03:10 +0000 Subject: modified the style of labels which are set not to have focus to make the selection visible. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1222 ee746299-78ed-0310-b773-934348b2243d --- src/headerview.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/headerview.c') diff --git a/src/headerview.c b/src/headerview.c index deb17861..a47adbb1 100644 --- a/src/headerview.c +++ b/src/headerview.c @@ -144,6 +144,9 @@ HeaderView *headerview_create(void) void headerview_init(HeaderView *headerview) { static PangoFontDescription *boldfont = NULL; +#ifdef G_OS_WIN32 + GtkStyle *style; +#endif if (!boldfont) { boldfont = pango_font_description_new(); @@ -157,6 +160,22 @@ void headerview_init(HeaderView *headerview) gtk_widget_modify_font(headerview->subject_header_label, boldfont); } +#ifdef G_OS_WIN32 +#define SET_LABEL_STYLE(label) \ + style = gtk_widget_get_style(label); \ + gtk_widget_modify_base(label, GTK_STATE_ACTIVE, \ + &style->base[GTK_STATE_SELECTED]); \ + gtk_widget_modify_text(label, GTK_STATE_ACTIVE, \ + &style->text[GTK_STATE_SELECTED]); + + SET_LABEL_STYLE(headerview->from_body_label); + SET_LABEL_STYLE(headerview->to_body_label); + SET_LABEL_STYLE(headerview->ng_body_label); + SET_LABEL_STYLE(headerview->subject_body_label); + +#undef SET_LABEL_STYLE +#endif + headerview_clear(headerview); headerview_set_visibility(headerview, prefs_common.display_header_pane); -- cgit v1.2.3