mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/register/gnome/gnucash-item-edit.c (item_edit_draw_info): fix
some left-right scrolling glitches git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3996 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
05c143599a
commit
b985ba8b04
@ -1,5 +1,8 @@
|
|||||||
2001-04-19 Dave Peticolas <dave@krondo.com>
|
2001-04-19 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
|
* src/register/gnome/gnucash-item-edit.c (item_edit_draw_info): fix
|
||||||
|
some left-right scrolling glitches
|
||||||
|
|
||||||
* src/gnome/dialog-tax-info.c: implement tax info api
|
* src/gnome/dialog-tax-info.c: implement tax info api
|
||||||
|
|
||||||
* src/gnome/account-tree.c: same as below
|
* src/gnome/account-tree.c: same as below
|
||||||
|
@ -140,6 +140,7 @@ item_edit_draw_info (ItemEdit *item_edit, int x, int y, TextDrawInfo *info)
|
|||||||
SheetBlock *block;
|
SheetBlock *block;
|
||||||
SheetBlockStyle *style;
|
SheetBlockStyle *style;
|
||||||
GtkEditable *editable;
|
GtkEditable *editable;
|
||||||
|
CellAlignment align;
|
||||||
Table *table;
|
Table *table;
|
||||||
|
|
||||||
gboolean hatching;
|
gboolean hatching;
|
||||||
@ -219,7 +220,9 @@ item_edit_draw_info (ItemEdit *item_edit, int x, int y, TextDrawInfo *info)
|
|||||||
info->text_rect.width = wd - toggle_space;
|
info->text_rect.width = wd - toggle_space;
|
||||||
info->text_rect.height = hd - 2;
|
info->text_rect.height = hd - 2;
|
||||||
|
|
||||||
switch (gnc_table_get_align (table, item_edit->virt_loc))
|
align = gnc_table_get_align (table, item_edit->virt_loc);
|
||||||
|
|
||||||
|
switch (align)
|
||||||
{
|
{
|
||||||
case CELL_ALIGN_RIGHT:
|
case CELL_ALIGN_RIGHT:
|
||||||
xoffset = info->text_rect.width -
|
xoffset = info->text_rect.width -
|
||||||
@ -247,6 +250,34 @@ item_edit_draw_info (ItemEdit *item_edit, int x, int y, TextDrawInfo *info)
|
|||||||
xoffset = CELL_HPADDING - pre_cursor_width;
|
xoffset = CELL_HPADDING - pre_cursor_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (align)
|
||||||
|
{
|
||||||
|
case CELL_ALIGN_RIGHT:
|
||||||
|
if (xoffset > CELL_HPADDING &&
|
||||||
|
xoffset + total_width >
|
||||||
|
info->text_rect.width - CELL_HPADDING)
|
||||||
|
xoffset = MAX (CELL_HPADDING,
|
||||||
|
(info->text_rect.width -
|
||||||
|
CELL_HPADDING) - total_width);
|
||||||
|
|
||||||
|
if (xoffset + total_width <
|
||||||
|
info->text_rect.width - CELL_HPADDING)
|
||||||
|
xoffset = (info->text_rect.width -
|
||||||
|
CELL_HPADDING) - total_width;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
xoffset = MIN (xoffset, CELL_HPADDING);
|
||||||
|
|
||||||
|
if (xoffset < CELL_HPADDING &&
|
||||||
|
xoffset + total_width <
|
||||||
|
info->text_rect.width - CELL_HPADDING)
|
||||||
|
xoffset = MIN (CELL_HPADDING,
|
||||||
|
(info->text_rect.width -
|
||||||
|
CELL_HPADDING) - total_width);
|
||||||
|
}
|
||||||
|
|
||||||
info->text_x1 = dx + xoffset;
|
info->text_x1 = dx + xoffset;
|
||||||
info->text_x2 = info->text_x1 + width_1;
|
info->text_x2 = info->text_x1 + width_1;
|
||||||
info->text_x3 = info->text_x2 + width_2;
|
info->text_x3 = info->text_x2 + width_2;
|
||||||
|
Loading…
Reference in New Issue
Block a user