def check_width(self):
        """
        Check whether the widget needs to have calculated or fixed width
        and whether the text should be scrolled.
        """
        if self.layout.width > self._scroll_width:
            if self.bar.horizontal or self.rotate:
                self.length_type = bar.STATIC
                self.length = self._scroll_width
            self._is_scrolling = True
            self._should_scroll = True
        else:
            if not self.bar.horizontal and not self.rotate:
                self.layout.width = self.scroll_fixed_width
            elif self.scroll_fixed_width:
                self.length_type = bar.STATIC
                self.length = self._scroll_width
            else:
                self.length_type = bar.CALCULATED
            self._should_scroll = False

        Check whether the widget needs to have calculated or fixed width
        and whether the text should be scrolled.
        
libqtile/widget/base.py