def layout(self):
        Wrapper.layout(self)
        # Work out the adjusted content width and height
        y = self.y
        if self._hscrollbar is not None:
            self._hscrollbar.set_position(self.x, self.y)
            y += self._hscrollbar.height
        if self._vscrollbar is not None:
            self._vscrollbar.set_position(self.x + self._content_width, y)

        # Set the scissor group
        self.root_group.x, self.root_group.y = self.x - 1, y - 1
        self.root_group.width = self._content_width + 1
        self.root_group.height = self._content_height + 1

        # Work out the content layout
        self._content_x, self._content_y = self.x, y
        left = self.x
        top = y + self._content_height - self.content.height
        if self._hscrollbar:
            left -= self._hscrollbar.get_knob_pos()
        if self._vscrollbar:
            top += self._vscrollbar.get_knob_pos()

        self.content.set_position(left, top)
Beispiel #2
0
    def layout(self):
        Wrapper.layout(self)
        # Work out the adjusted content width and height
        y = self.y
        if self._hscrollbar is not None:
            self._hscrollbar.set_position(self.x, self.y)
            y += self._hscrollbar.height
        if self._vscrollbar is not None:
            self._vscrollbar.set_position(self.x + self._content_width, y)

        # Set the scissor group
        self.root_group.x, self.root_group.y = self.x - 1, y - 1
        self.root_group.width = self._content_width + 1
        self.root_group.height = self._content_height + 1

        # Work out the content layout
        self._content_x, self._content_y = self.x, y
        left = self.x
        top = y + self._content_height - self.content.height
        if self._hscrollbar:
            left -= self._hscrollbar.get_knob_pos()
        if self._vscrollbar:
            top += self._vscrollbar.get_knob_pos()

        self.content.set_position(left, top)
Beispiel #3
0
    def layout(self, loadWrapper=True):

        if loadWrapper:
            Wrapper.layout(self)
        # Work out the adjusted content width and height
        y = self.y + (self.height - self._content_height)
        if self._hscrollbar is not None:
            self._hscrollbar.set_position(self.x, self.y)
            y += self._hscrollbar.height
        if self._vscrollbar is not None:
            self._vscrollbar.set_position(self.x + self._content_width, y)
        #print str(int(time()*1000-t1))
        # Set the scissor group
        self.root_group.x, self.root_group.y = self.x - 1, y - 1
        self.root_group.width = self._content_width + 1
        self.root_group.height = self._content_height + 1

        # Work out the content layout
        self._content_x, self._content_y = self.x, y
        left = self.x
        top = y + self._content_height - self.content.height
        #t1 = time()*1000
        if self._hscrollbar:
            left -= self._hscrollbar.get_knob_pos()
        if self._vscrollbar:
            top += self._vscrollbar.get_knob_pos()
        #t1 = time()*1000

        self.content.set_position(left, top)