Fix 0001431: Tried to run a statistics report:
svn: r9600
This commit is contained in:
parent
3708d4f73f
commit
88ff3ab413
@ -1,3 +1,6 @@
|
|||||||
|
2007-12-27 Brian Matherly <brian@gramps-project.org>
|
||||||
|
* src/docgen/CairoDoc.py: Fix 0001431: Tried to run a statistics report:
|
||||||
|
|
||||||
2007-12-27 Brian Matherly <brian@gramps-project.org>
|
2007-12-27 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/plugins/DescendReport.py:
|
* src/plugins/DescendReport.py:
|
||||||
* src/plugins/AncestorReport.py:
|
* src/plugins/AncestorReport.py:
|
||||||
|
@ -1212,19 +1212,20 @@ class CairoDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
|
|||||||
|
|
||||||
# ...the text separately
|
# ...the text separately
|
||||||
paragraph_style_name = style.get_paragraph_style()
|
paragraph_style_name = style.get_paragraph_style()
|
||||||
paragraph_style = style_sheet.get_paragraph_style(paragraph_style_name)
|
if paragraph_style_name:
|
||||||
paragraph_style.set_alignment(BaseDoc.PARA_ALIGN_LEFT)
|
paragraph_style = style_sheet.get_paragraph_style(paragraph_style_name)
|
||||||
|
paragraph_style.set_alignment(BaseDoc.PARA_ALIGN_LEFT)
|
||||||
# horizontal position of the text is not included in the style,
|
|
||||||
# we assume that it is the size of the shadow, or 0.2mm
|
|
||||||
if style.get_shadow():
|
|
||||||
x_offset = style.get_shadow_space()
|
|
||||||
else:
|
|
||||||
x_offset = 0.2
|
|
||||||
|
|
||||||
new_text = GtkDocText(paragraph_style, 'center', text,
|
# horizontal position of the text is not included in the style,
|
||||||
x + x_offset , y + h / 2, angle=0)
|
# we assume that it is the size of the shadow, or 0.2mm
|
||||||
self._active_element.add_child(new_text)
|
if style.get_shadow():
|
||||||
|
x_offset = style.get_shadow_space()
|
||||||
|
else:
|
||||||
|
x_offset = 0.2
|
||||||
|
|
||||||
|
new_text = GtkDocText(paragraph_style, 'center', text,
|
||||||
|
x + x_offset , y + h / 2, angle=0)
|
||||||
|
self._active_element.add_child(new_text)
|
||||||
|
|
||||||
def draw_text(self, style_name, text, x, y):
|
def draw_text(self, style_name, text, x, y):
|
||||||
style_sheet = self.get_style_sheet()
|
style_sheet = self.get_style_sheet()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user