Adjust available paper height in DescendChart.py and AncestorChart.py when

report is forced onto one page, so that it won't draw on the bottom margin.


svn: r9052
This commit is contained in:
Zsolt Foldvari 2007-10-01 09:05:40 +00:00
parent 3a98a3166e
commit 99119d189a
3 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-10-01 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/plugins/DescendChart.py:
* src/plugins/AncestorChart.py:
Adjust available paper height when report is forced onto one page,
so that it won't draw on the bottom margin.
2007-10-01 Benny Malengier <benny.malengier@gramps-project.org> 2007-10-01 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_DbUtils.py: do deep copy of bookmarks from old to new db * src/GrampsDb/_DbUtils.py: do deep copy of bookmarks from old to new db
* src/GrampsDb/_GrampsXMLDB.py: in load_from: load correct bookmarks * src/GrampsDb/_GrampsXMLDB.py: in load_from: load correct bookmarks

View File

@ -285,11 +285,15 @@ class AncestorChart(Report):
if self.title and self.force_fit: if self.title and self.force_fit:
pstyle = style_sheet.get_paragraph_style("AC2-Title") pstyle = style_sheet.get_paragraph_style("AC2-Title")
tfont = pstyle.get_font() tfont = pstyle.get_font()
self.offset = pt2cm(1.25* tfont.get_size()) self.offset = pt2cm(1.25 * tfont.get_size())
gstyle = style_sheet.get_draw_style("AC2-box")
shadow_height = gstyle.get_shadow_space()
else: else:
self.offset = 0 self.offset = 0
self.uh = self.doc.get_usable_height() - self.offset shadow_height = 0
uw = self.doc.get_usable_width()-pt2cm(self.box_pad_pts) self.uh = self.doc.get_usable_height() - self.offset - shadow_height
uw = self.doc.get_usable_width() - pt2cm(self.box_pad_pts)
calc_width = pt2cm(self.box_width + self.box_pad_pts) + 0.2 calc_width = pt2cm(self.box_width + self.box_pad_pts) + 0.2
self.box_width = pt2cm(self.box_width) self.box_width = pt2cm(self.box_width)

View File

@ -262,11 +262,15 @@ class DescendChart(Report):
if self.title and self.force_fit: if self.title and self.force_fit:
pstyle = style_sheet.get_paragraph_style("DC2-Title") pstyle = style_sheet.get_paragraph_style("DC2-Title")
tfont = pstyle.get_font() tfont = pstyle.get_font()
self.offset = pt2cm(1.25* tfont.get_size()) self.offset = pt2cm(1.25 * tfont.get_size())
gstyle = style_sheet.get_draw_style("DC2-box")
shadow_height = gstyle.get_shadow_space()
else: else:
self.offset = 0 self.offset = 0
self.uh = self.doc.get_usable_height() - self.offset shadow_height = 0
uw = self.doc.get_usable_width()-pt2cm(self.box_pad_pts) self.uh = self.doc.get_usable_height() - self.offset - shadow_height
uw = self.doc.get_usable_width() - pt2cm(self.box_pad_pts)
calc_width = pt2cm(self.box_width + self.box_pad_pts) + self.box_gap calc_width = pt2cm(self.box_width + self.box_pad_pts) + self.box_gap
self.box_width = pt2cm(self.box_width) self.box_width = pt2cm(self.box_width)