2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the horizontal box widget"
19
# Change sys path to glitter path
20
glitter_path = os.path.split(sys.path[0])[0]
21
sys.path[0] = glitter_path
23
from window import Window
25
from label import Label
26
from image import Image
28
class TestHBox(object):
29
""" Tests for the horizontal box widget """
32
""" Initialize test """
34
self.window = Window("Glitter tests")
35
self.window.connect("destroy", self.destroy)
37
self.stage = self.window.get_stage()
38
self.stage.connect('notify::width', self.do_resize)
39
self.stage.connect('notify::height', self.do_resize)
42
self.stage.add(self.hbox)
43
self.hbox._update_layout()
45
self.image1 = Image("base.py")
46
self.hbox.pack(self.image1)
48
self.image2 = Image("base.py")
49
self.hbox.pack(self.image2)
51
self.image3 = Image("base.py")
52
self.hbox.pack(self.image3)
54
self.window.show_all()
57
def do_resize(self, stage, event):
58
self.hbox._update_layout()
60
def destroy(self, widget, data=None):
64
if __name__ == '__main__':