'Adjusts the width and height of the file switcher
based on the relative size of the parent and content.'

def fix_size(self, content):

    if content:
        (width, height) = self.get_item_size(content)
        parent = self.parent()
        relative_width = (parent.geometry().width() * 0.65)
        if (relative_width > self.MAX_WIDTH):
            relative_width = self.MAX_WIDTH
        self.list.setMinimumWidth(relative_width)
        if (len(content) < 8):
            max_entries = len(content)
        else:
            max_entries = 8
        max_height = ((height * max_entries) * 2.5)
        self.list.setMinimumHeight(max_height)
        self.list.resize(relative_width, self.list.height())
