mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Andreas Köhler's patch to fix the alignment of cells in the register.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12155 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e72d156c03
commit
6a3f33e5eb
@ -1,3 +1,8 @@
|
||||
2005-12-10 David Hampton <hampton@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@ihtfp.com>
|
||||
|
||||
* configure.in: g-wrap 1.9.6 can define the module-dir as
|
||||
|
@ -366,7 +366,7 @@ draw_cell (GnucashGrid *grid,
|
||||
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 @@ draw_cell (GnucashGrid *grid,
|
||||
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 @@ draw_cell (GnucashGrid *grid,
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user