ubuntuusers.de

Zeile 417 - 470 von /usr/share/screenlet

Datum:
12. Februar 2012 04:46
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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,'<b>' +weather[1]["day"][:3] + '</b>', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT)

				#	p_layout.set_markup('<b>' +weather[1]["day"][:3] + '</b>')						
				#	ctx.show_layout(p_layout)
					ctx.translate(24, 0)
					self.draw_text(ctx,'<b>' +weather[2]["day"][:3] + '</b>', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT)

					ctx.translate(24, 0)
					self.draw_text(ctx,'<b>' +weather[3]["day"][:3] + '</b>', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT)

					ctx.translate(24, 0)
					self.draw_text(ctx,'<b>' +weather[4]["day"][:3] + '</b>', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT)

					ctx.translate(24, 0)
					self.draw_text(ctx,'<b>' +weather[5]["day"][:3] + '</b>', 0,0, self.font.split(' ')[0], 6, self.width,pango.ALIGN_LEFT)

					ctx.translate(24, 0)
					self.draw_text(ctx,'<b>' +weather[6]["day"][:3] + '</b>', 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('<b>' + "  "+weather[4]["day"].center(14)+weather[5]["day"].center(14)+weather[6]["day"].center(12)+'</b>')						
				#	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()