[balsa/gtk3] Make selected text highlighted
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Make selected text highlighted
- Date: Fri, 10 Jun 2011 12:10:22 +0000 (UTC)
commit 7c6fecd377399221d7f54eb2fb6bdfb82a0329b4
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Jun 10 08:09:22 2011 -0400
Make selected text highlighted
* src/balsa-mime-widget-message.c (bm_header_widget_realized):
set the foreground and background colors for SELECTED state as
well as for NORMAL, so that selected text is distinguished.
ChangeLog | 6 ++++++
src/balsa-mime-widget-message.c | 19 +++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b62c3ee..d3144c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-10 Peter Bloomfield
+
+ * src/balsa-mime-widget-message.c (bm_header_widget_realized):
+ set the foreground and background colors for SELECTED state as
+ well as for NORMAL, so that selected text is distinguished.
+
2011-06-05 Peter Bloomfield
* src/save-restore.c (config_identities_load): load identities
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index dde0d6b..a8c992f 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -407,14 +407,14 @@ bm_header_widget_realized(GtkWidget * widget, BalsaMessage * bm)
GtkWidget *tl_buttons;
context = gtk_widget_get_style_context(GTK_WIDGET(bm));
+ tl_buttons = g_object_get_data(G_OBJECT(widget), "tl-buttons");
+
gtk_style_context_get_background_color(context, GTK_STATE_FLAG_NORMAL,
&rgba);
gtk_widget_override_background_color(bm_header_widget_get_text_view
(widget), GTK_STATE_FLAG_NORMAL,
&rgba);
- tl_buttons =
- GTK_WIDGET(g_object_get_data(G_OBJECT(widget), "tl-buttons"));
if (tl_buttons) {
gtk_widget_override_background_color(tl_buttons,
GTK_STATE_FLAG_NORMAL, &rgba);
@@ -423,6 +423,21 @@ bm_header_widget_realized(GtkWidget * widget, BalsaMessage * bm)
gtk_style_context_get_color(context, GTK_STATE_FLAG_NORMAL, &rgba);
gtk_widget_override_color(bm_header_widget_get_text_view(widget),
GTK_STATE_FLAG_NORMAL, &rgba);
+
+ gtk_style_context_get_background_color(context, GTK_STATE_FLAG_SELECTED,
+ &rgba);
+ gtk_widget_override_background_color(bm_header_widget_get_text_view
+ (widget), GTK_STATE_FLAG_SELECTED,
+ &rgba);
+
+ if (tl_buttons) {
+ gtk_widget_override_background_color(tl_buttons,
+ GTK_STATE_FLAG_SELECTED, &rgba);
+ }
+
+ gtk_style_context_get_color(context, GTK_STATE_FLAG_SELECTED, &rgba);
+ gtk_widget_override_color(bm_header_widget_get_text_view(widget),
+ GTK_STATE_FLAG_SELECTED, &rgba);
}
/* Callback for the "style-set" signal; reset colors when theme is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]