tuikit/scrollbar.py
changeset 76 fa5301e58eca
parent 75 2430c643838a
equal deleted inserted replaced
75:2430c643838a 76:fa5301e58eca
    35         """Maximum for scrolling position."""
    35         """Maximum for scrolling position."""
    36         return self._scroll_max
    36         return self._scroll_max
    37 
    37 
    38     @scroll_max.setter
    38     @scroll_max.setter
    39     def scroll_max(self, value):
    39     def scroll_max(self, value):
       
    40         if value < 0:
       
    41             value = 0
    40         self._scroll_max = value
    42         self._scroll_max = value
    41         if self._scroll_pos > value:
    43         if self._scroll_pos > value:
    42             self._scroll_pos = value
    44             self._scroll_pos = value
    43             self.emit('change')
    45             self.emit('change')
    44         self._update_thumb_pos()
    46         self._update_thumb_pos()