Update Simplified Chinese Strings (#1610)
[gpodder.git] / tools / progressbar_icon_tester.py
blob13d352dabcea0cbf67e14ebf4147029a9d07c5b3
1 #!/usr/bin/env python3
2 # Progressbar icon tester
3 # Thomas Perl <thp.io/about>; 2012-02-05
5 # based on: Simple script to test gPodder's "pill" pixbuf implementation
6 # Thomas Perl <thp.io/about>; 2009-09-13
8 import sys
10 from gi.repository import Gtk
12 from gpodder.gtkui.draw import draw_cake_pixbuf
14 sys.path.insert(0, 'src')
17 def gen(percentage):
18 pixbuf = draw_cake_pixbuf(percentage)
19 return Gtk.Image.new_from_pixbuf(pixbuf)
22 w = Gtk.Window()
23 w.connect('destroy', Gtk.main_quit)
24 v = Gtk.VBox()
25 w.add(v)
26 for y in range(1):
27 h = Gtk.HBox()
28 h.set_homogeneous(True)
29 v.add(h)
30 PARTS = 20
31 for x in range(PARTS + 1):
32 h.add(gen(x / PARTS))
33 w.set_default_size(400, 100)
34 w.show_all()
35 Gtk.main()