[Bug 3475] Unable to set background colour for a column in
objectlist.
bugzilla-daemon at async.com.br
bugzilla-daemon at async.com.br
Mon Jul 16 10:01:54 BRT 2007
http://bugs.async.com.br/show_bug.cgi?id=3475
Johan Dahlin <jdahlin at async.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #4229|review?(jdahlin at async.com.br|review-
Flag|) |
--- Comment #3 from Johan Dahlin <jdahlin at async.com.br> 2007-07-16 10:01:53 BRT ---
(From update of attachment 4229)
>Index: kiwi/ui/objectlist.py
>+ # check not more than one background attribute set
>+ if len(
>+ [k for k in kwargs if k in ['bg', 'bg_attr', 'bg_data_func']]
>+ ) > 1:
Jikes.
But I guess there is no other way.
> # CellRenderers
>+ def _cell_data_global_func(self, tree_column, renderer, model, treeiter,
>+ (column, renderer_prop)):
>+ row = model[treeiter]
>+ data = row[COL_MODEL]
>+
>+ if column.bg_data_func:
>+ col = column.bg_data_func(data)
>+ elif column.bg_attr:
>+ col = column.get_attribute(data, column.bg_attr)
>+ elif column.bg:
>+ col = column.bg
>+ else:
>+ col = None
>+ if col is None:
>+ renderer.set_property('cell-background-set', False)
>+ else:
>+ renderer.set_property('cell-background', col)
>+ column.cell_data_func(tree_column, renderer, model, treeiter,
>+ (column, renderer_prop))
This bit of extra overhead is unfortunate. It only applies if you have a
background color set right?
Wouldn't it be possible to avoid this unless you use any of the background
attributes in the column?
--
Configure bugmail: http://bugs.async.com.br/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the Kiwi
mailing list