[ghex] Use the theme color for drawing selection background



commit 3d1f6cf60483ca9153d79554f43706b2d2570dd7
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Feb 20 22:03:33 2012 +0200

    Use the theme color for drawing selection background
    
    We used to draw "active" and "insensitive" background colours, depending
    on where the cursor was, but apparently latest Adwaita theme uses white
    for boths of these.
    
    Switch to the "selected" colour to make the selected part visible.

 src/gtkhex.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 61dd20d..93339b9 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -440,10 +440,7 @@ render_hex_highlights (GtkHex *gh,
 	state = gtk_widget_get_state_flags (gh->xdisp);
 
 	gtk_style_context_save (context);
-	if (gh->active_view == VIEW_HEX)
-		state |= GTK_STATE_FLAG_ACTIVE;
-	else
-		state |= GTK_STATE_FLAG_INSENSITIVE;
+	state |= GTK_STATE_FLAG_SELECTED;
 	gtk_style_context_set_state (context, state);
 
 	cairo_save (cr);
@@ -533,10 +530,7 @@ render_ascii_highlights (GtkHex *gh,
 	state = gtk_widget_get_state_flags (gh->adisp);
 
 	gtk_style_context_save (context);
-	if (gh->active_view == VIEW_ASCII)
-		state |= GTK_STATE_FLAG_ACTIVE;
-	else
-		state |= GTK_STATE_FLAG_INSENSITIVE;
+	state |= GTK_STATE_FLAG_SELECTED;
 	gtk_style_context_set_state (context, state);
 
 	cairo_save (cr);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]