示例#1
0
    def _canvas_default(self):
        """ Trait initialiser.
        """

        logo_path = join(dirname(__file__), "images", "python.png")
        logo = Image(image_file=logo_path, bounds=[100, 196],
            position=[25, 25])

        workbench_path = join(dirname(__file__), "images",
            "workbench.png")
        workbench = RelativeImage(image_file=workbench_path, bounds=[128, 128])
        workbench.on_trait_change(self._on_workbench, "selected")

        app_name = self.window.application.name
        title = RelativeText(text=app_name, font="Sans 72",
            font_color="dark orchid", bounds=[66, 66])

        canvas = Canvas(bgcolor="white")
        canvas.add(logo)
        canvas.add(workbench)
#        canvas.add(title)

        return canvas
示例#2
0
    def _canvas_default(self):
        """ Trait initialiser.
        """

        logo_path = join(IMAGE_PATH, "logos", "python.png")
        logo = Image(image_file=logo_path, bounds=[100, 196], position=[25, 25])

        workbench_path = join(IMAGE_PATH, "logos", "cviewer2.jpg")

        workbench = RelativeImage(image_file=workbench_path, bounds=[128, 128], position=[0, 0])
        workbench.on_trait_change(self._on_workbench, "selected")

        #        app_name = "Select ConnectomeViewer Perspective ..." #self.window.application.name

        #        title = RelativeText(text=app_name, font="DEFAULT 16",
        #            font_color="black", bounds=[66, 66])

        canvas = Canvas(bgcolor="white")
        canvas.add(logo)
        canvas.add(workbench)
        #        canvas.add(title)

        return canvas