[ghex] Don't allocate an extra pixel for each widget
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Don't allocate an extra pixel for each widget
- Date: Tue, 21 Feb 2012 04:50:32 +0000 (UTC)
commit 1ab7c0b4404d53b0450d72fa0df568a1e6b9d769
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Feb 20 22:21:08 2012 +0200
Don't allocate an extra pixel for each widget
... to avoid overdrawing frames with widgets' contents, depending on the
window size.
src/gtkhex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 93339b9..c2f233f 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -989,9 +989,9 @@ static void recalc_displays(GtkHex *gh, guint width, guint height) {
gh->vis_lines = ((gint) (height - 2 * gtk_container_get_border_width (GTK_CONTAINER (gh)) - padding.top - padding.bottom)) / ((gint) gh->char_height);
- gh->adisp_width = gh->cpl*gh->char_width + 1;
+ gh->adisp_width = gh->cpl*gh->char_width;
xcpl = gh->cpl*2 + (gh->cpl - 1)/gh->group_type;
- gh->xdisp_width = xcpl*gh->char_width + 1;
+ gh->xdisp_width = xcpl*gh->char_width;
if(gh->disp_buffer)
g_free(gh->disp_buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]