[Gnucash-changes] r12155 - gnucash/trunk - Andreas Köhler's patch to fix the alignment of cells in the register.
David Hampton
hampton at cvs.gnucash.org
Sat Dec 10 15:22:12 EST 2005
Author: hampton
Date: 2005-12-10 15:22:11 -0500 (Sat, 10 Dec 2005)
New Revision: 12155
Trac: http://svn.gnucash.org/trac/changeset/12155
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/register/register-gnome/gnucash-grid.c
Log:
Andreas Köhler's patch to fix the alignment of cells in the register.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2005-12-09 18:28:42 UTC (rev 12154)
+++ gnucash/trunk/ChangeLog 2005-12-10 20:22:11 UTC (rev 12155)
@@ -1,3 +1,8 @@
+2005-12-10 David Hampton <hampton at employees.org>
+
+ * src/register/register-gnome/gnucash-grid.c: Andreas Köhler's
+ patch to fix the alignment of cells in the register.
+
2005-12-09 Derek Atkins <derek at ihtfp.com>
* configure.in: g-wrap 1.9.6 can define the module-dir as
Modified: gnucash/trunk/src/register/register-gnome/gnucash-grid.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-grid.c 2005-12-09 18:28:42 UTC (rev 12154)
+++ gnucash/trunk/src/register/register-gnome/gnucash-grid.c 2005-12-10 20:22:11 UTC (rev 12155)
@@ -366,7 +366,7 @@
PangoLayout *layout;
PangoContext *context;
PangoFontDescription *font;
- PangoRectangle ink_rect;
+ PangoRectangle logical_rect;
GdkColor *bg_color;
GdkColor *fg_color;
/* gint x_offset, y_offset;*/
@@ -491,8 +491,8 @@
y_offset++;*/
pango_layout_get_pixel_extents(layout,
- &ink_rect,
- NULL);
+ NULL,
+ &logical_rect);
rect.x = x + CELL_HPADDING;
rect.y = y + CELL_VPADDING;
@@ -510,15 +510,15 @@
break;
case CELL_ALIGN_RIGHT:
- x_offset = width - 2 * CELL_HPADDING - ink_rect.width;
+ x_offset = width - 2 * CELL_HPADDING - logical_rect.width + 1;
break;
case CELL_ALIGN_CENTER:
- if (ink_rect.width > width - 2 * CELL_HPADDING)
+ if (logical_rect.width > width - 2 * CELL_HPADDING)
x_offset = 0;
else
x_offset = (width - 2 * CELL_HPADDING -
- ink_rect.width) / 2;
+ logical_rect.width) / 2;
break;
}
More information about the gnucash-changes
mailing list