Esempio n. 1
0
    def update_creation(self):
        """Update the author and date
        """
        author = self.pres.meta.get('author', '')
        author_spec = spec_from_style(config.STYLE["author"])

        date = self.pres.meta.get('date', '')
        date_spec = spec_from_style(config.STYLE["date"])

        self.creation.set_text([
            (author_spec, f"  {author} "),
            (date_spec, f" {date} "),
        ])
Esempio n. 2
0
 def update_slide_num(self):
     """Update the slide number
     """
     slide_text = "slide {} / {}".format(
         self.curr_slide.number + 1,
         len(self.pres.slides),
     )
     date = self.pres.meta.get('date', '')
     spec = spec_from_style(config.STYLE["slides"])
     self.slide_num.set_text([(spec, slide_text)])
Esempio n. 3
0
 def update_title(self):
     """Update the title
     """
     title = self.pres.meta.get("title", "")
     spec = spec_from_style(config.STYLE["title"])
     self.slide_title.set_text([(spec, f" {title} ")])
Esempio n. 4
0
def text(style, data, align="left"):
    if isinstance(style, dict):
        style = spec_from_style(style)
    return urwid.Text((style, data), align=align)