2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the slider 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
24
from image import Image
25
from toolbar import Toolbar
27
class TestToolbar(object):
28
""" Tests for the frame widget, depends on Image 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)
40
self.image = Image("base.py")
41
self.stage.add(self.image)
42
self.image._update_layout()
44
self.toolbar = Toolbar()
45
self.stage.add(self.toolbar)
46
self.toolbar.natural_width = 0.6
47
self.toolbar.natural_height = 0.6
48
self.toolbar._update_layout()
50
self.window.show_all()
53
def destroy(self, widget, data=None):
56
def do_resize(self, stage, event):
57
self.image._update_layout()
58
self.toolbar._update_layout()
60
if __name__ == '__main__':