if (self.mini == False): ctx.save() ctx.translate(14, 60) self.theme.render(ctx,'day-bg') #self.theme['day-bg.svg'].render_cairo(ctx) ###render the days background #print self.theme.path self.draw_text(ctx,'' +weather[1]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) # p_layout.set_markup('' +weather[1]["day"][:3] + '') # ctx.show_layout(p_layout) ctx.translate(24, 0) self.draw_text(ctx,'' +weather[2]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) ctx.translate(24, 0) self.draw_text(ctx,'' +weather[3]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) ctx.translate(24, 0) self.draw_text(ctx,'' +weather[4]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) ctx.translate(24, 0) self.draw_text(ctx,'' +weather[5]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) ctx.translate(24, 0) self.draw_text(ctx,'' +weather[6]["day"][:3] + '', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT) ctx.restore() # ctx.save() german_days = {"Mon":"Mo","Tue":"Di","Wed":"Mi","Thu":"Do","Fri":"Fr","Sat":"Sa","Sun":"So"} # ctx.translate(0, 50) ###render the days background # self.theme['day-bg.svg'].render_cairo(ctx) # p_layout = ctx.create_layout() # p_fdesc = pango.FontDescription() # p_fdesc.set_family_static("Monospace") # p_fdesc.set_size(3 * pango.SCALE) # p_fdesc.set_weight(300) ###render the days of the week (second row) # p_fdesc.set_style(pango.STYLE_NORMAL) # p_layout.set_font_description(p_fdesc) # p_layout.set_markup('' + " "+weather[4]["day"].center(14)+weather[5]["day"].center(14)+weather[6]["day"].center(12)+'') # ctx.show_layout(p_layout) # ctx.restore() #ctx.save() #ctx.translate(36, 28) #self.theme['divider.svg'].render_cairo(ctx) #ctx.translate(31,0) ######render the dividers #self.theme['divider.svg'].render_cairo(ctx) #ctx.restore() ctx.save()