GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Talk is a small, Clutter-based presentation application
Clone URL: git://github.com/ebassi/talk.git
Position the bullets in the middle of the slide
Emmanuele Bassi (author)
Thu Feb 21 10:10:50 -0800 2008
commit  dcb6503d2f4b86ba4c3067fb1bc00e99f33e3d90
tree    6eb10f7a8b78136ade9ba7b1f8a4770ef7a2eb4d
parent  6ec0566f040b4d4e4b2bb6f3b556a6d906fd6cb4
...
29
30
31
 
32
33
34
...
44
45
46
47
 
 
 
 
48
49
50
...
53
54
55
56
57
 
 
58
59
60
 
 
61
62
63
64
65
 
66
67
 
 
 
68
...
29
30
31
32
33
34
35
...
45
46
47
 
48
49
50
51
52
53
54
...
57
58
59
 
 
60
61
62
 
 
63
64
65
66
67
68
 
69
70
 
71
72
73
74
0
@@ -29,6 +29,7 @@ class BulletSlide (TalkSlide):
0
         self.title = title
0
         if self.title:
0
             self._title_label = clutter.Label()
0
+ label.set_color(clutter.Color(255, 255, 255, 255))
0
             self._title_label.set_font_name('Sans 36px')
0
             self._title_label.set_use_markup(True)
0
             self._title_label.set_text(self.title)
0
@@ -44,7 +45,10 @@ class BulletSlide (TalkSlide):
0
         if bullets and len(bullets) > 0:
0
             self.bullets = bullets
0
 
0
- count = 1
0
+ group = clutter.Group()
0
+
0
+ x_offset = 50
0
+ y_offset = 0
0
         for bullet in self.bullets:
0
             text = u'\u2023 ' + bullet
0
 
0
@@ -53,16 +57,18 @@ class BulletSlide (TalkSlide):
0
             label.set_font_name('Sans 28px')
0
             label.set_use_markup(True)
0
             label.set_text(text)
0
- label.set_width(TalkSlide.WIDTH)
0
- self.add(label)
0
+ label.set_width(TalkSlide.WIDTH - x_offset)
0
+ group.add(label)
0
 
0
- x = 50
0
- y = self.get_header_width() + (count * 50) + 100
0
+ x = x_offset
0
+ y = y_offset
0
 
0
             label.set_position(x, y)
0
             label.show()
0
 
0
- #print "bullet[%d] = '%s' (%d, %d)" % (count, text, x, y)
0
+ y_offset = y_offset + label.get_height() + 10
0
 
0
- count = count + 1
0
+ self.add(group)
0
+ group.set_position(0, (TalkSlide.HEIGHT - group.get_height()) / 2)
0
+ group.show()
0
 

Comments

    No one has commented yet.