本文整理汇总了Python中gramps.gen.plug.docgen.TableCellStyle.set_padding方法的典型用法代码示例。如果您正苦于以下问题:Python TableCellStyle.set_padding方法的具体用法?Python TableCellStyle.set_padding怎么用?Python TableCellStyle.set_padding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gramps.gen.plug.docgen.TableCellStyle
的用法示例。
在下文中一共展示了TableCellStyle.set_padding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __media_style
# 需要导入模块: from gramps.gen.plug.docgen import TableCellStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableCellStyle import set_padding [as 别名]
def __media_style(self):
"""
Define the style used for media
"""
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(3)
tbl.set_column_width(0, 32.3)
tbl.set_column_width(1, 32.3)
tbl.set_column_width(2, 32.3)
self.default_style.add_table_style('REPO-MediaTab', tbl)
cell = TableCellStyle()
cell.set_padding(0.5)
cell.set_top_border(1)
cell.set_bottom_border(1)
cell.set_right_border(0.5)
cell.set_left_border(0.5)
self.default_style.add_cell_style("REPO-MediaCell", cell)
示例2: make_default_style
# 需要导入模块: from gramps.gen.plug.docgen import TableCellStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableCellStyle import set_padding [as 别名]
def make_default_style(self,default_style):
"""Make default output style for the Family Group Report."""
para = ParagraphStyle()
#Paragraph Styles
font = FontStyle()
font.set_size(4)
para.set_font(font)
default_style.add_paragraph_style('FGR-blank',para)
font = FontStyle()
font.set_type_face(FONT_SANS_SERIF)
font.set_size(16)
font.set_bold(1)
para = ParagraphStyle()
para.set_font(font)
para.set_alignment(PARA_ALIGN_CENTER)
para.set_header_level(1)
para.set_description(_("The style used for the title of the page."))
default_style.add_paragraph_style('FGR-Title',para)
font = FontStyle()
font.set_type_face(FONT_SERIF)
font.set_size(10)
font.set_bold(0)
para = ParagraphStyle()
para.set_font(font)
para.set_description(_('The basic style used for the text display.'))
default_style.add_paragraph_style('FGR-Normal',para)
para = ParagraphStyle()
font = FontStyle()
font.set_type_face(FONT_SERIF)
font.set_size(10)
font.set_bold(0)
para.set_font(font)
para.set(lmargin=0.0)
para.set_top_margin(0.0)
para.set_bottom_margin(0.0)
para.set_description(_('The basic style used for the note display.'))
default_style.add_paragraph_style("FGR-Note",para)
font = FontStyle()
font.set_type_face(FONT_SANS_SERIF)
font.set_size(10)
font.set_bold(1)
para = ParagraphStyle()
para.set_font(font)
para.set_description(_('The style used for the text related to the children.'))
default_style.add_paragraph_style('FGR-ChildText',para)
font = FontStyle()
font.set_type_face(FONT_SANS_SERIF)
font.set_size(12)
font.set_bold(1)
para = ParagraphStyle()
para.set_font(font)
para.set_header_level(3)
para.set_description(_("The style used for the parent's name"))
default_style.add_paragraph_style('FGR-ParentName',para)
#Table Styles
cell = TableCellStyle()
cell.set_padding(0.2)
cell.set_top_border(1)
cell.set_bottom_border(1)
cell.set_right_border(1)
cell.set_left_border(1)
default_style.add_cell_style('FGR-ParentHead',cell)
cell = TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_left_border(1)
default_style.add_cell_style('FGR-TextContents',cell)
cell = TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(0)
cell.set_left_border(1)
cell.set_padding(0.1)
default_style.add_cell_style('FGR-TextChild1',cell)
cell = TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_left_border(1)
cell.set_padding(0.1)
default_style.add_cell_style('FGR-TextChild2',cell)
cell = TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_right_border(1)
cell.set_left_border(1)
default_style.add_cell_style('FGR-TextContentsEnd',cell)
cell = TableCellStyle()
cell.set_padding(0.2)
cell.set_bottom_border(1)
cell.set_right_border(1)
#.........这里部分代码省略.........