mirror of
https://github.com/NaN-tic/tryton-gtk2.git
synced 2023-12-14 03:12:58 +01:00
Fix alignment for numeric field
This commit is contained in:
parent
9d67b5b67c
commit
ceadc135ee
1 changed files with 3 additions and 2 deletions
|
@ -131,6 +131,7 @@ class ParserTree(ParserInterface):
|
|||
twidth = {
|
||||
'integer': 60,
|
||||
'float': 80,
|
||||
'numeric': 80,
|
||||
'float_time': 80,
|
||||
'date': 80,
|
||||
'datetime': 120,
|
||||
|
@ -154,7 +155,7 @@ class ParserTree(ParserInterface):
|
|||
col.set_visible(not fields[fname].get('tree_invisible', False))
|
||||
i = treeview.append_column(col)
|
||||
if 'sum' in fields[fname] and fields[fname]['type'] \
|
||||
in ('integer', 'float', 'float_time'):
|
||||
in ('integer', 'float', 'numeric', 'float_time'):
|
||||
label = gtk.Label()
|
||||
label.set_use_markup(True)
|
||||
label_str = fields[fname]['sum'] + ': '
|
||||
|
@ -187,7 +188,7 @@ class Char(object):
|
|||
cell.set_property('text', text)
|
||||
color = self.get_color(model)
|
||||
cell.set_property('foreground', str(color))
|
||||
if self.attrs['type'] in ('float', 'integer', 'boolean'):
|
||||
if self.attrs['type'] in ('float', 'integer', 'boolean', 'numeric'):
|
||||
align = 1
|
||||
else:
|
||||
align = 0
|
||||
|
|
Loading…
Reference in a new issue