2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the horizontal box widget"
13
# Change sys path to glitter path
14
glitter_path = os.path.split(sys.path[0])[0]
15
sys.path[0] = glitter_path
17
from window import Window
22
from window import Window
24
from label import Label
25
from image import Image
27
class TestHBox(object):
28
""" Tests for the horizontal box widget """
31
""" Initialize test """
33
self.window = Window("Glitter tests")
34
self.window.connect("destroy", self.destroy)
36
self.stage = self.window.get_stage()
37
self.stage.connect('notify::width', self.do_resize)
38
self.stage.connect('notify::height', self.do_resize)
41
self.hbox.spacing = 0.0
42
self.stage.add(self.hbox)
43
self.hbox._update_layout()
45
self.image2 = Image("base.py")
46
self.image2.h_offset = 0.1
47
self.hbox.pack(self.image2)
49
self.window.show_all()
52
def do_resize(self, stage, event):
53
self.hbox._update_layout()
55
def destroy(self, widget, data=None):
59
if __name__ == '__main__':