[ghex] Include the scrollbar when drawing a frame around the ascii display



commit 9781306c33b6793074034d968fe3fef030bdab7b
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Feb 20 23:06:44 2012 +0200

    Include the scrollbar when drawing a frame around the ascii display

 src/gtkhex.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gtkhex.c b/src/gtkhex.c
index c2f233f..7ec1dba 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -909,12 +909,13 @@ draw_shadow (GtkWidget *widget,
 	                  gh->xdisp_width + padding.left + padding.right,
 	                  allocation.height - 2 * border);
 
+	/* Draw a frame around the ascii display + scrollbar */
 	gtk_widget_get_requisition(gh->scrollbar, &sb_req);
 	gtk_render_frame (context,
 	                  cr,
 	                  allocation.width - border - gh->adisp_width - sb_req.width - padding.left - padding.right,
 	                  border,
-	                  gh->adisp_width + padding.left + padding.right,
+	                  gh->adisp_width + sb_req.width + padding.left + padding.right,
 	                  allocation.height - 2 * border);
 }
 
@@ -1983,11 +1984,11 @@ static gboolean
 gtk_hex_draw (GtkWidget *w,
               cairo_t *cr)
 {
-	draw_shadow (w, cr);
-	
 	if (GTK_WIDGET_CLASS (parent_class)->draw)
 		(* GTK_WIDGET_CLASS (parent_class)->draw) (w, cr);
-	
+
+	draw_shadow (w, cr);
+
 	return TRUE;
 }
 



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